fix DEPLOY_FILE_ROOT_FOLDER variable

This commit is contained in:
Roberto Cirillo 2022-08-04 15:54:27 +02:00
parent 10c932cc83
commit 879193b653
1 changed files with 6 additions and 5 deletions

11
Jenkinsfile vendored
View File

@ -45,10 +45,11 @@ pipeline {
environment {
AGENT_ROOT_FOLDER = "${agent_root_folder}"
DEPLOY_ROOT_FOLDER ="${agent_root_folder}/ansible-repos/ansible-playbooks/d4science-ghn-cluster/CD"
DEPLOY_ROOT_FOLDER ="${agent_root_folder}/ansible-repos/ansible-playbooks/d4science-ghn-cluster"
DEPLOY_FILE_ROOT_FOLDER="${agent_root_folder}/CD"
PIPELINE_BUILD_NUMBER = "${env.BUILD_NUMBER}"
DEPLOY_FILE = "${agent_root_folder}/deploy.${PIPELINE_BUILD_NUMBER}.csv"
BACKUP_FILE = "${agent_root_folder}/deploy.${PIPELINE_BUILD_NUMBER}.bck"
DEPLOY_FILE = "${DEPLOY_FILE_ROOT_FOLDER}/deploy.${PIPELINE_BUILD_NUMBER}.csv"
BACKUP_FILE = "${DEPLOY_FILE_ROOT_FOLDER}/deploy.${PIPELINE_BUILD_NUMBER}.bck"
TRIGGER_JOB= "${params.TRIGGER_JOB}"
TRIGGER_VERSION= "${params.TRIGGER_VERSION}"
TRIGGER_HOST="${params.TRIGGER_HOST}"
@ -79,7 +80,7 @@ pipeline {
steps {
sh '''
date=`date`;
mkdir -p /${DEPLOY_ROOT_FOLDER}
mkdir -p /${DEPLOY_FILE_ROOT_FOLDER}
'''
}
}
@ -97,7 +98,7 @@ pipeline {
// parse the report and extract the data
// def components = getComponentsFromCSV(deployList)
println "Going to check the deploy file in ${DEPLOY_ROOT_FOLDER}"
def components =getComponentsFromCSVDir("${DEPLOY_ROOT_FOLDER}")
def components =getComponentsFromCSVDir("${DEPLOY_FILE_ROOT_FOLDER}")
if (components.size() > 0) {
for (component in components) {
stage(component){