diff --git a/Jenkinsfile b/Jenkinsfile index 897112d..f5224e1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,6 +2,21 @@ pipeline { agent any stages { + stage('[Neutral] - Check Version') { + steps { + script { + def commit_name = sh "ssh raphix@raphix.fr sudo -S -u gitlab-ci git log -1 --pretty=%B" + if(commit_name.contains("@")) { + echo "[Neutral] - Deployement version reconnu" + + } else { + currentBuild.result = 'ABORTED' + return + + } + } + } + } stage('[Neutral] - Test') { steps { echo "[Neutral-Deploy] - Test Stage" @@ -13,7 +28,7 @@ pipeline { } } - stage('[Neutral] - Deploy') { + stage('[Neutral] - Déploiement') { steps { script { def doesJavaRock = input(message: 'Confirmation de Déploiement', ok: 'Déployer')