remove file creation from intialize environment

This commit is contained in:
Roberto Cirillo 2022-04-28 17:53:58 +02:00
parent 3f9de719d0
commit 855d2b7228
1 changed files with 4 additions and 6 deletions

8
Jenkinsfile vendored
View File

@ -53,8 +53,6 @@ pipeline {
steps {
sh '''
date=`date`;
touch $DEPLOY_FILE;
touch $BACKUP_FILE;
'''
}
}
@ -87,9 +85,9 @@ pipeline {
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
mv ${DEPLOY_FILE} ${BACKUP_FILE};
rm ${DEPLOY_FILE};
'''
}
}
@ -115,7 +113,7 @@ pipeline {
steps {
sh '''
echo "Cron build enabled. New deploy of ${TRIGGER_JOB} - ${TRIGGER_VERSION} will be added to the deploy file"
touch $DEPLOY_FILE;
if grep -q \"\${TRIGGER_JOB}\" \${DEPLOY_FILE}; then
echo "component ${TRIGGER_JOB} already added. Nothing to add."
else