CI: Escape backslashes in printenv/sort/tr

Change-Id: I52be64c8f6af2bbe15148a856d1f10cb113e1e94
(cherry picked from commit c6558e09af)
This commit is contained in:
George Joseph 2019-08-08 11:10:11 -06:00
parent db9684ad1e
commit 92066b8746
4 changed files with 4 additions and 4 deletions

View File

@ -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 ]],

View File

@ -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"
}

View File

@ -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"
}

View File

@ -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 ]],