generated from gCubeCI/Pipeline-Docker-Template
remove file creation from intialize environment
This commit is contained in:
parent
3f9de719d0
commit
855d2b7228
|
@ -53,8 +53,6 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
date=`date`;
|
date=`date`;
|
||||||
touch $DEPLOY_FILE;
|
|
||||||
touch $BACKUP_FILE;
|
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,9 +85,9 @@ pipeline {
|
||||||
if [ -f ${BACKUP_FILE} ]; then
|
if [ -f ${BACKUP_FILE} ]; then
|
||||||
echo "backup found: ${BACKUP_FILE} going to replace it";
|
echo "backup found: ${BACKUP_FILE} going to replace it";
|
||||||
rm ${BACKUP_FILE};
|
rm ${BACKUP_FILE};
|
||||||
mv ${DEPLOY_FILE} ${BACKUP_FILE};
|
|
||||||
touch ${DEPLOY_FILE};
|
|
||||||
fi
|
fi
|
||||||
|
mv ${DEPLOY_FILE} ${BACKUP_FILE};
|
||||||
|
rm ${DEPLOY_FILE};
|
||||||
'''
|
'''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -115,7 +113,7 @@ pipeline {
|
||||||
steps {
|
steps {
|
||||||
sh '''
|
sh '''
|
||||||
echo "Cron build enabled. New deploy of ${TRIGGER_JOB} - ${TRIGGER_VERSION} will be added to the deploy file"
|
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
|
if grep -q \"\${TRIGGER_JOB}\" \${DEPLOY_FILE}; then
|
||||||
echo "component ${TRIGGER_JOB} already added. Nothing to add."
|
echo "component ${TRIGGER_JOB} already added. Nothing to add."
|
||||||
else
|
else
|
||||||
|
@ -174,7 +172,7 @@ pipeline {
|
||||||
def parseCSVList(def deployList) {
|
def parseCSVList(def deployList) {
|
||||||
def components = []
|
def components = []
|
||||||
if (fileExists("${deployList}")) {
|
if (fileExists("${deployList}")) {
|
||||||
echo ' file found'
|
echo 'file found'
|
||||||
readFile("${deployList}").split('\n').each { line, count->
|
readFile("${deployList}").split('\n').each { line, count->
|
||||||
if (line.startsWith('#'))
|
if (line.startsWith('#'))
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue