add new var CD_ROOT_FOLDER

This commit is contained in:
Roberto Cirillo 2022-09-30 17:57:05 +02:00
parent ed52fdb21e
commit 5debaa7edd
1 changed files with 2 additions and 1 deletions

3
Jenkinsfile vendored
View File

@ -52,6 +52,7 @@ pipeline {
AGENT_ROOT_FOLDER = "${agent_root_folder}" AGENT_ROOT_FOLDER = "${agent_root_folder}"
DEPLOY_ROOT_FOLDER ="${agent_root_folder}/ansible-repos/ansible-playbooks/d4science-ghn-cluster" DEPLOY_ROOT_FOLDER ="${agent_root_folder}/ansible-repos/ansible-playbooks/d4science-ghn-cluster"
DEPLOY_FILE_ROOT_FOLDER="${agent_root_folder}/CD/" DEPLOY_FILE_ROOT_FOLDER="${agent_root_folder}/CD/"
CD_ROOT_FOLDER = "${agent_root_folder}/ansible-repos/ansible-playbooks/d4science-ghn-cluster/CD"
PIPELINE_BUILD_NUMBER = "${env.BUILD_NUMBER}" PIPELINE_BUILD_NUMBER = "${env.BUILD_NUMBER}"
DEPLOY_FILE = "${DEPLOY_FILE_ROOT_FOLDER}deploy.${PIPELINE_BUILD_NUMBER}.csv" DEPLOY_FILE = "${DEPLOY_FILE_ROOT_FOLDER}deploy.${PIPELINE_BUILD_NUMBER}.csv"
BACKUP_FILE = "${DEPLOY_FILE_ROOT_FOLDER}deploy.${PIPELINE_BUILD_NUMBER}.bck" BACKUP_FILE = "${DEPLOY_FILE_ROOT_FOLDER}deploy.${PIPELINE_BUILD_NUMBER}.bck"
@ -275,7 +276,7 @@ def getComponentsFromCSV(def deployList) {
def deploy(String service, String version, String host){ def deploy(String service, String version, String host){
def now = new Date(); def now = new Date();
println("Going to deploy the service "+service+" with version: "+version+" on target: "+host); println("Going to deploy the service "+service+" with version: "+version+" on target: "+host);
def statusCode = sh( script: "cd $DEPLOY_ROOT_FOLDER;./deployService.sh $service $version $host;", returnStdout: true); def statusCode = sh( script: "cd $CD_ROOT_FOLDER;./deployService.sh $service $version $host;", returnStdout: true);
sh(""" sh("""
echo " last exit code \$?"; echo " last exit code \$?";
""") """)