fix clean method

This commit is contained in:
Roberto Cirillo 2022-10-04 10:40:02 +02:00
parent 3f3e10fa2f
commit 7a361393f1
1 changed files with 5 additions and 5 deletions

10
Jenkinsfile vendored
View File

@ -309,13 +309,13 @@ def cleanup(def DEPLOY_FILE, def BACKUP_FILE){
}
//clean and update the local deploy file
def clean(def DEPLOY_FILE){
def clean(def file){
sh '''
echo "cleanup $DEPLOY_FILE";
if [ -f ${DEPLOY_FILE} ]; then
rm ${DEPLOY_FILE};
echo "cleaning $file";
if [ -f ${file} ]; then
rm ${file};
else
echo "deploy file empty"
echo "file not exist"
fi
'''
}