fix cleanup section

This commit is contained in:
Roberto Cirillo 2022-04-28 14:04:24 +02:00
parent ea8ba55ee2
commit 9eb103ddd0
1 changed files with 4 additions and 4 deletions

8
Jenkinsfile vendored
View File

@ -77,11 +77,11 @@ pipeline {
} }
sh ''' sh '''
echo "cleanup $DEPLOY_FILE" echo "cleanup $DEPLOY_FILE"
if [ -f ${DEPLOY_BACKUP ]; then if [ -f ${DEPLOY_BACKUP} ]; then
echo "backup found: $DEPLOY_BACKUP going to replace it" echo "backup found: ${DEPLOY_BACKUP} going to replace it"
rm ${DEPLOY_BACKUP} rm ${DEPLOY_BACKUP}
mv $DEPLOY_FILE $DEPLOY_BACKUP mv ${DEPLOY_FILE} ${DEPLOY_BACKUP}
touch $DEPLOY_FILE touch ${DEPLOY_FILE}
''' '''
} }
} }