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 '''
|
sh '''
|
||||||
echo "cleanup $DEPLOY_FILE";
|
echo "cleanup $DEPLOY_FILE";
|
||||||
if [ -f ${BACKUP_FILE} ]; then
|
if [ -f ${DEPLOY_FILE} ]; then
|
||||||
echo "backup found: ${BACKUP_FILE} going to replace it";
|
if [ -f ${BACKUP_FILE} ]; then
|
||||||
rm ${BACKUP_FILE};
|
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
|
fi
|
||||||
mv ${DEPLOY_FILE} ${BACKUP_FILE};
|
|
||||||
rm ${DEPLOY_FILE};
|
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue