From 622dce0fab2f583c4d6cbd71413177c11730ae1e Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Fri, 22 Apr 2022 17:09:31 +0200 Subject: [PATCH] create new vars TRIGGER-JOB and VERSION --- Jenkinsfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index aafe119..c79f6b8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -25,6 +25,8 @@ pipeline { environment { AGENT_ROOT_FOLDER = "${agent_root_folder}" DEPLOY_FILE = "${agent_root_folder}/deploy.txt" + TRIGGER_JOB= "${params.TRIGGER_JOB}" + TRIGGER_VERSION= "${params.TRIGGER_VERSION}" } stages { stage('initialize environment') { @@ -87,8 +89,8 @@ pipeline { } steps { sh ''' - echo "Cron build enabled. New deploy of ${params.TRIGGER_JOB} - ${params.TRIGGER_VERSION} appended to the deploy file" - echo "${params.TRIGGER_JOB} - ${params.TRIGGER_VERSION}" >> $DEPLOY_FILE + echo "Cron build enabled. New deploy of ${TRIGGER_JOB} - ${TRIGGER_VERSION} appended to the deploy file" + echo "${TRIGGER_JOB} - ${TRIGGER_VERSION}" >> ${DEPLOY_FILE} ''' } }