neutral-old/Jenkinsfile
Raphix 4b200351e1
All checks were successful
Neutral/pipeline/head This commit looks good
Test Neutral Pipeline #6
2023-03-19 18:00:57 +01:00

38 lines
1.2 KiB
Groovy

pipeline {
agent any
stages {
stage('[Neutral] - Test') {
steps {
echo "[Neutral-Deploy] - Test Stage"
sh "rm -rf neutral"
sh "git clone https://git.raphix.fr/infrastructure/neutral.git"
sh "cd neutral"
sh "npm i"
sh "ENV='TEST' node bin/www"
}
}
stage('[Neutral] - Deploy') {
steps {
script {
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"
}
}
}
}
}
}