Skip to content
Snippets Groups Projects
Commit b083537d authored by George Joseph's avatar George Joseph
Browse files

CI: Escape backslashes in printenv/sort/tr

Change-Id: I52be64c8f6af2bbe15148a856d1f10cb113e1e94
(cherry picked from commit c6558e09)
parent c4b6e3c1
No related branches found
No related tags found
No related merge requests found
...@@ -100,7 +100,7 @@ pipeline { ...@@ -100,7 +100,7 @@ pipeline {
withCredentials([usernamePassword(credentialsId: "${JENKINS_GERRIT_CREDS}", withCredentials([usernamePassword(credentialsId: "${JENKINS_GERRIT_CREDS}",
passwordVariable: 'GERRIT_USER_PW', usernameVariable: 'GERRIT_USER_NAME')]) { 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', checkout scm: [$class: 'GitSCM',
branches: [[name: env.GERRIT_BRANCH ]], branches: [[name: env.GERRIT_BRANCH ]],
......
...@@ -43,7 +43,7 @@ pipeline { ...@@ -43,7 +43,7 @@ pipeline {
stage ("Checkout") { stage ("Checkout") {
sh "sudo chown -R jenkins:users ." 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" sh "sudo tests/CI/setupJenkinsEnvironment.sh"
} }
......
...@@ -43,7 +43,7 @@ pipeline { ...@@ -43,7 +43,7 @@ pipeline {
stage ("Checkout") { stage ("Checkout") {
sh "sudo chown -R jenkins:users ." 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" sh "sudo tests/CI/setupJenkinsEnvironment.sh"
} }
......
...@@ -100,7 +100,7 @@ pipeline { ...@@ -100,7 +100,7 @@ pipeline {
withCredentials([usernamePassword(credentialsId: "${JENKINS_GERRIT_CREDS}", withCredentials([usernamePassword(credentialsId: "${JENKINS_GERRIT_CREDS}",
passwordVariable: 'GERRIT_USER_PW', usernameVariable: 'GERRIT_USER_NAME')]) { 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', checkout scm: [$class: 'GitSCM',
branches: [[name: env.GERRIT_BRANCH ]], branches: [[name: env.GERRIT_BRANCH ]],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment