From 453c1754178ea170f95eafe1b50c5355688b2c03 Mon Sep 17 00:00:00 2001 From: Roberto Cirillo Date: Wed, 27 Apr 2022 16:09:45 +0200 Subject: [PATCH] escaping grep command --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9e6d5b6..5175125 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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}