generated from gCubeCI/Pipeline-Docker-Template
fix if condition on pending stage
This commit is contained in:
parent
fd6fbff1f8
commit
d17a3c7995
|
@ -94,10 +94,10 @@ pipeline {
|
|||
steps {
|
||||
sh '''
|
||||
echo "Cron build enabled. New deploy of ${TRIGGER_JOB} - ${TRIGGER_VERSION} will be added to the deploy file"
|
||||
if( !(grep "${TRIGGER_JOB}" ${DEPLOY_FILE})) then
|
||||
echo "${TRIGGER_JOB},${TRIGGER_VERSION}" >> ${DEPLOY_FILE}
|
||||
if grep -q "${TRIGGER_JOB}" ${DEPLOY_FILE} then
|
||||
echo "component ${TRIGGER_JOB} already added. Nothing to add."
|
||||
else
|
||||
echo "component ${TRIGGER_JOB} already added"
|
||||
echo "${TRIGGER_JOB},${TRIGGER_VERSION}" >> ${DEPLOY_FILE}
|
||||
'''
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue