From 9e8b0c094bad088a4ac79a83eb11323f35d15d9e Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Thu, 28 Apr 2022 16:36:46 +0200 Subject: [PATCH] fix BACKUP_FILE var --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 107461f..31fd4f8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -81,10 +81,10 @@ pipeline { } sh ''' echo "cleanup $DEPLOY_FILE"; - if [ -f ${DEPLOY_BACKUP} ]; then - echo "backup found: ${DEPLOY_BACKUP} going to replace it"; - rm ${DEPLOY_BACKUP}; - mv ${DEPLOY_FILE} ${DEPLOY_BACKUP}; + if [ -f ${BACKUP_FILE} ]; then + echo "backup found: ${BACKUP_FILE} going to replace it"; + rm ${BACKUP_FILE}; + mv ${DEPLOY_FILE} ${BACKUP_FILE}; touch ${DEPLOY_FILE}; fi '''