neutral-old/Jenkinsfile
Raphix 0665130c3c
Some checks reported errors
Neutral/pipeline/head Something is wrong with the build of this commit
Test Neutral Pipeline #5
2023-03-19 17:56:35 +01:00

36 lines
1.4 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 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'])
}
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"
}
}
}
}