[Asterisk-code-review] CI: Escape backslashes in printenv/sort/tr (...asterisk[master])
George Joseph
asteriskteam at digium.com
Thu Aug 8 12:20:22 CDT 2019
George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/asterisk/+/12719 )
Change subject: CI: Escape backslashes in printenv/sort/tr
......................................................................
CI: Escape backslashes in printenv/sort/tr
Change-Id: I52be64c8f6af2bbe15148a856d1f10cb113e1e94
(cherry picked from commit c6558e09af3ac15b31377de735cc96d8df0275a7)
---
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(-)
Approvals:
George Joseph: Looks good to me, approved; Approved for Submit
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/+/12719
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Change-Id: I52be64c8f6af2bbe15148a856d1f10cb113e1e94
Gerrit-Change-Number: 12719
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190808/7a87cfe1/attachment-0001.html>
More information about the asterisk-code-review
mailing list