escaping grep command

This commit is contained in:
Roberto Cirillo 2022-04-27 16:09:45 +02:00
parent 428f35fe48
commit 453c175417
1 changed files with 1 additions and 1 deletions

2
Jenkinsfile vendored
View File

@ -94,7 +94,7 @@ pipeline {
steps {
sh '''
echo "Cron build enabled. New deploy of ${TRIGGER_JOB} - ${TRIGGER_VERSION} will be added to the 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."
else
echo "${TRIGGER_JOB},${TRIGGER_VERSION}" >> ${DEPLOY_FILE}