From: Thanh Ha Date: Mon, 2 Oct 2017 21:34:58 +0000 (-0400) Subject: Fix unescaped * in if-statement X-Git-Tag: v0.9.1^0 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=4e494e6bf70108968f052cd4ce1d8379fee04a43;p=releng%2Fglobal-jjb.git Fix unescaped * in if-statement Change-Id: I8e45a1adc13f4da0e7386371678f6364670f5c38 Signed-off-by: Thanh Ha --- diff --git a/.jjb-test/expected-xml/gerrit-ciman-jjb-deploy-job b/.jjb-test/expected-xml/gerrit-ciman-jjb-deploy-job index fa7cca57..80597b98 100644 --- a/.jjb-test/expected-xml/gerrit-ciman-jjb-deploy-job +++ b/.jjb-test/expected-xml/gerrit-ciman-jjb-deploy-job @@ -249,7 +249,7 @@ COMMENT="${GERRIT_EVENT_COMMENT_TEXT:-$ghprbCommentBody}" JOB_NAME=$(echo "$COMMENT" | grep jjb-deploy | awk '{print $2}') # Strip all * characters to prevent pushing all jobs to Jenkins -if [ -z "${JOB_NAME//*/}" ]; then +if [ -z "${JOB_NAME//\*/}" ]; then echo "ERROR: JOB_NAME cannot be empty or '*'." exit 1 fi diff --git a/.jjb-test/expected-xml/github-ciman-jjb-deploy-job b/.jjb-test/expected-xml/github-ciman-jjb-deploy-job index a214b2df..b364dde7 100644 --- a/.jjb-test/expected-xml/github-ciman-jjb-deploy-job +++ b/.jjb-test/expected-xml/github-ciman-jjb-deploy-job @@ -217,7 +217,7 @@ COMMENT="${GERRIT_EVENT_COMMENT_TEXT:-$ghprbCommentBody}" JOB_NAME=$(echo "$COMMENT" | grep jjb-deploy | awk '{print $2}') # Strip all * characters to prevent pushing all jobs to Jenkins -if [ -z "${JOB_NAME//*/}" ]; then +if [ -z "${JOB_NAME//\*/}" ]; then echo "ERROR: JOB_NAME cannot be empty or '*'." exit 1 fi diff --git a/shell/jjb-deploy-job.sh b/shell/jjb-deploy-job.sh index c7b8d8d7..3db95062 100644 --- a/shell/jjb-deploy-job.sh +++ b/shell/jjb-deploy-job.sh @@ -27,7 +27,7 @@ COMMENT="${GERRIT_EVENT_COMMENT_TEXT:-$ghprbCommentBody}" JOB_NAME=$(echo "$COMMENT" | grep jjb-deploy | awk '{print $2}') # Strip all * characters to prevent pushing all jobs to Jenkins -if [ -z "${JOB_NAME//*/}" ]; then +if [ -z "${JOB_NAME//\*/}" ]; then echo "ERROR: JOB_NAME cannot be empty or '*'." exit 1 fi