[Asterisk-code-review] CI: Escape backslashes in printenv/sort/tr (...asterisk[13])

George Joseph asteriskteam at digium.com
Thu Aug 8 12:10:30 CDT 2019


George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/12715


Change subject: CI: Escape backslashes in printenv/sort/tr
......................................................................

CI: Escape backslashes in printenv/sort/tr

Change-Id: I52be64c8f6af2bbe15148a856d1f10cb113e1e94
---
M tests/CI/gates.jenkinsfile
M tests/CI/periodics-daily.jenkinsfile
M tests/CI/ref_debug.jenkinsfile
M tests/CI/unittests.jenkinsfile
4 files changed, 4 insertions(+), 4 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/15/12715/1

diff --git a/tests/CI/gates.jenkinsfile b/tests/CI/gates.jenkinsfile
index 219abb0..82ef343 100644
--- a/tests/CI/gates.jenkinsfile
+++ b/tests/CI/gates.jenkinsfile
@@ -100,7 +100,7 @@
 						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 ce10209..352737f 100644
--- a/tests/CI/periodics-daily.jenkinsfile
+++ b/tests/CI/periodics-daily.jenkinsfile
@@ -43,7 +43,7 @@
 
 					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 5c4f487..a87f7dc 100644
--- a/tests/CI/ref_debug.jenkinsfile
+++ b/tests/CI/ref_debug.jenkinsfile
@@ -43,7 +43,7 @@
 
 					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 7a5cd4a..6f81479 100644
--- a/tests/CI/unittests.jenkinsfile
+++ b/tests/CI/unittests.jenkinsfile
@@ -100,7 +100,7 @@
 						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 ]],

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/12715
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Change-Id: I52be64c8f6af2bbe15148a856d1f10cb113e1e94
Gerrit-Change-Number: 12715
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190808/2ba477c0/attachment.html>


More information about the asterisk-code-review mailing list