From: George Joseph Date: Thu, 8 Aug 2019 17:10:11 +0000 (-0600) Subject: CI: Escape backslashes in printenv/sort/tr X-Git-Tag: 17.0.0-rc1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b083537d844fd9b988f9bbf5d42d38e6244337e5;p=thirdparty%2Fasterisk.git CI: Escape backslashes in printenv/sort/tr Change-Id: I52be64c8f6af2bbe15148a856d1f10cb113e1e94 (cherry picked from commit c6558e09af3ac15b31377de735cc96d8df0275a7) --- diff --git a/tests/CI/gates.jenkinsfile b/tests/CI/gates.jenkinsfile index 219abb0cc6..82ef343498 100644 --- a/tests/CI/gates.jenkinsfile +++ b/tests/CI/gates.jenkinsfile @@ -100,7 +100,7 @@ pipeline { withCredentials([usernamePassword(credentialsId: "${JENKINS_GERRIT_CREDS}", passwordVariable: 'GERRIT_USER_PW', usernameVariable: 'GERRIT_USER_NAME')]) { - sh "printenv -0 | sort -z | tr '\0' '\n'" + sh "printenv -0 | sort -z | tr '\\0' '\\n'" checkout scm: [$class: 'GitSCM', branches: [[name: env.GERRIT_BRANCH ]], diff --git a/tests/CI/periodics-daily.jenkinsfile b/tests/CI/periodics-daily.jenkinsfile index ce10209fb7..352737fd1d 100644 --- a/tests/CI/periodics-daily.jenkinsfile +++ b/tests/CI/periodics-daily.jenkinsfile @@ -43,7 +43,7 @@ pipeline { stage ("Checkout") { sh "sudo chown -R jenkins:users ." - sh "printenv -0 | sort -z | tr '\0' '\n'" + sh "printenv -0 | sort -z | tr '\\0' '\\n'" sh "sudo tests/CI/setupJenkinsEnvironment.sh" } diff --git a/tests/CI/ref_debug.jenkinsfile b/tests/CI/ref_debug.jenkinsfile index 5c4f4873fe..a87f7dce64 100644 --- a/tests/CI/ref_debug.jenkinsfile +++ b/tests/CI/ref_debug.jenkinsfile @@ -43,7 +43,7 @@ pipeline { stage ("Checkout") { sh "sudo chown -R jenkins:users ." - sh "printenv -0 | sort -z | tr '\0' '\n'" + sh "printenv -0 | sort -z | tr '\\0' '\\n'" sh "sudo tests/CI/setupJenkinsEnvironment.sh" } diff --git a/tests/CI/unittests.jenkinsfile b/tests/CI/unittests.jenkinsfile index 7a5cd4ad6d..6f81479c66 100644 --- a/tests/CI/unittests.jenkinsfile +++ b/tests/CI/unittests.jenkinsfile @@ -100,7 +100,7 @@ pipeline { withCredentials([usernamePassword(credentialsId: "${JENKINS_GERRIT_CREDS}", passwordVariable: 'GERRIT_USER_PW', usernameVariable: 'GERRIT_USER_NAME')]) { - sh "printenv -0 | sort -z | tr '\0' '\n'" + sh "printenv -0 | sort -z | tr '\\0' '\\n'" checkout scm: [$class: 'GitSCM', branches: [[name: env.GERRIT_BRANCH ]],