generated from gCubeCI/Pipeline-Docker-Template
rename var DEPLOY_FILE_ROOT_FOLDER to PENDING_DEPLOY_FOLDER
This commit is contained in:
parent
c9db997000
commit
f72d3705fb
|
@ -50,12 +50,11 @@ pipeline {
|
|||
|
||||
environment {
|
||||
AGENT_ROOT_FOLDER = "${agent_root_folder}"
|
||||
DEPLOY_ROOT_FOLDER ="${agent_root_folder}/ansible-repos/ansible-playbooks/d4science-ghn-cluster"
|
||||
DEPLOY_FILE_ROOT_FOLDER="${agent_root_folder}/CD/"
|
||||
PENDING_DEPLOY_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}"
|
||||
DEPLOY_FILE = "${DEPLOY_FILE_ROOT_FOLDER}deploy.${PIPELINE_BUILD_NUMBER}.csv"
|
||||
BACKUP_FILE = "${DEPLOY_FILE_ROOT_FOLDER}deploy.${PIPELINE_BUILD_NUMBER}.bck"
|
||||
DEPLOY_FILE = "${PENDING_DEPLOY_FOLDER}deploy.${PIPELINE_BUILD_NUMBER}.csv"
|
||||
BACKUP_FILE = "${PENDING_DEPLOY_FOLDER}deploy.${PIPELINE_BUILD_NUMBER}.bck"
|
||||
TRIGGER_JOB= "${params.TRIGGER_JOB}"
|
||||
TRIGGER_VERSION= "${params.TRIGGER_VERSION}"
|
||||
TRIGGER_HOST="${params.TRIGGER_HOST}"
|
||||
|
@ -86,9 +85,9 @@ pipeline {
|
|||
steps {
|
||||
sh '''
|
||||
date=`date`;
|
||||
mkdir -p ${DEPLOY_FILE_ROOT_FOLDER}
|
||||
mkdir -p ${PENDING_DEPLOY_FOLDER}
|
||||
mkdir -p "${WORKSPACE}/CD"
|
||||
find "${DEPLOY_FILE_ROOT_FOLDER}" -type f -exec mv --target-directory="${WORKSPACE}/CD" '\'{'\'} '\'+
|
||||
find "${PENDING_DEPLOY_FOLDER}" -type f -exec mv --target-directory="${WORKSPACE}/CD" '\'{'\'} '\'+
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
@ -103,7 +102,7 @@ pipeline {
|
|||
steps {
|
||||
echo 'Cron build enabled. Deploy from system ongoing'
|
||||
script {
|
||||
println "Going to check the deploy file in ${DEPLOY_FILE_ROOT_FOLDER}"
|
||||
println "Going to check the deploy file in ${PENDING_DEPLOY_FOLDER}"
|
||||
def records = readCSV file: 'CD/deploy.csv'
|
||||
for (def record : records) {
|
||||
println("Processing record: "+record)
|
||||
|
@ -151,8 +150,7 @@ pipeline {
|
|||
else
|
||||
echo "${TRIGGER_JOB},${TRIGGER_VERSION},${TRIGGER_HOST}" >> ${DEPLOY_FILE}
|
||||
fi
|
||||
'''
|
||||
|
||||
'''
|
||||
// the following catch give always an error in order to return a feedback UNSTABLE to the final user since the deploy is still not performed
|
||||
catchError(buildResult: 'UNSTABLE', stageResult: 'UNSTABLE') {
|
||||
sh("""
|
||||
|
|
Loading…
Reference in New Issue