From 4b200351e17e821dd524103cecdbaeafca18a00e Mon Sep 17 00:00:00 2001 From: Raphix Date: Sun, 19 Mar 2023 18:00:57 +0100 Subject: [PATCH] Test Neutral Pipeline #6 --- Jenkinsfile | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ec38c05..3a3d0d2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -16,20 +16,22 @@ pipeline { stage('[Neutral] - Deploy') { steps { script { - def userInput = input( - id: 'userInput', message: 'Enter path of test reports:?', - parameters: [ - [$class: 'TextParameterDefinition', defaultValue: 'None', description: 'Path of config file', name: 'Config'], - [$class: 'TextParameterDefinition', defaultValue: 'None', description: 'Test Info file', name: 'Test'] - ]) - echo ("IQA Sheet Path: "+userInput['Config']) - echo ("Test Info file path: "+userInput['Test']) + def doesJavaRock = input(message: 'Confirmation de Déploiement', ok: 'Yes', + parameters: [booleanParam(defaultValue: true, + description: 'Confirmation',name: 'Oui')]) + if(doesJavaRock == true) { + + echo "[Neutral-Deploy] - Deploy Stage" + sh "ssh raphix@raphix.fr sudo apt update -y" + sh "ssh raphix@raphix.fr sudo apt upgrade -y" + sh "ssh raphix@raphix.fr sudo -S -u gitlab-ci /home/gitlab-ci/neutral_deploy.sh" + } else { + + echo "aborted" + } } - echo "[Neutral-Deploy] - Deploy Stage" - sh "ssh raphix@raphix.fr sudo apt update -y" - sh "ssh raphix@raphix.fr sudo apt upgrade -y" - sh "ssh raphix@raphix.fr sudo -S -u gitlab-ci /home/gitlab-ci/neutral_deploy.sh" + } } }