neutral-old/Jenkinsfile

34 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2023-03-18 18:20:17 +01:00
pipeline {
agent any
stages {
stage('[Neutral] - Test') {
2023-03-18 22:47:09 +01:00
steps {
2023-03-19 18:28:30 +01:00
script {
2023-03-19 18:29:18 +01:00
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"
2023-03-19 18:28:30 +01:00
}
2023-03-19 18:29:18 +01:00
2023-03-18 18:20:17 +01:00
}
2023-03-18 22:57:04 +01:00
}
2023-03-19 18:18:36 +01:00
stage('[Neutral] - Déploiement') {
2023-03-18 18:20:17 +01:00
steps {
2023-03-19 17:56:35 +01:00
script {
2023-03-19 18:42:46 +01:00
2023-03-19 18:03:57 +01:00
def doesJavaRock = input(message: 'Confirmation de Déploiement', ok: 'Déployer')
2023-03-19 18:02:41 +01:00
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"
2023-03-19 17:56:35 +01:00
}
2023-03-19 18:00:57 +01:00
2023-03-18 18:20:17 +01:00
}
}
}
}