From cab43d1a152998eb00a1c0f2cab6a3e9853de7b0 Mon Sep 17 00:00:00 2001 From: Raphix Date: Sun, 19 Mar 2023 18:28:30 +0100 Subject: [PATCH] Test Neutral Pipeline #12 --- Jenkinsfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index c027160..8954080 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -20,6 +20,18 @@ pipeline { } stage('[Neutral] - Test') { steps { + script { + def commit_name = env.TAG_NAME + if(commit_name) { + echo "[Neutral] - Deployement version reconnu" + + } else { + currentBuild.result = 'ABORTED' + echo "[Neutral] - Deployement version non reconnu" + return + + } + } echo "[Neutral-Deploy] - Test Stage" sh "rm -rf neutral" sh "git clone https://git.raphix.fr/infrastructure/neutral.git" @@ -32,6 +44,18 @@ pipeline { stage('[Neutral] - Déploiement') { steps { script { + + def commit_name = env.TAG_NAME + if(commit_name) { + echo "[Neutral] - Deployement version reconnu" + + } else { + currentBuild.result = 'ABORTED' + echo "[Neutral] - Deployement version non reconnu" + return + + } + def doesJavaRock = input(message: 'Confirmation de Déploiement', ok: 'Déployer') echo "[Neutral-Deploy] - Deploy Stage" sh "ssh raphix@raphix.fr sudo apt update -y"