generated from gCubeCI/Pipeline-Docker-Template
check on deploy file added
This commit is contained in:
parent
223b9ea7d6
commit
12c11d6047
|
@ -82,12 +82,16 @@ pipeline {
|
|||
}
|
||||
sh '''
|
||||
echo "cleanup $DEPLOY_FILE";
|
||||
if [ -f ${BACKUP_FILE} ]; then
|
||||
echo "backup found: ${BACKUP_FILE} going to replace it";
|
||||
rm ${BACKUP_FILE};
|
||||
fi
|
||||
mv ${DEPLOY_FILE} ${BACKUP_FILE};
|
||||
rm ${DEPLOY_FILE};
|
||||
if [ -f ${DEPLOY_FILE} ]; then
|
||||
if [ -f ${BACKUP_FILE} ]; then
|
||||
echo "backup found: ${BACKUP_FILE} going to replace it";
|
||||
rm ${BACKUP_FILE};
|
||||
fi
|
||||
mv ${DEPLOY_FILE} ${BACKUP_FILE};
|
||||
rm ${DEPLOY_FILE};
|
||||
else
|
||||
echo "deploy file empty"
|
||||
fi
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue