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

George Joseph asteriskteam at digium.com
Thu Aug 8 12:28:52 CDT 2019


George Joseph has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/testsuite/+/12726 )

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

CI: Escape backslashes in printenv/sort/tr

Change-Id: If62de37e6557c93def791002c2daf07a0e945977
---
M CI/gates.jenkinsfile
M CI/unittests.jenkinsfile
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  George Joseph: Looks good to me, approved; Approved for Submit



diff --git a/CI/gates.jenkinsfile b/CI/gates.jenkinsfile
index 80dc390..309bed6 100644
--- a/CI/gates.jenkinsfile
+++ b/CI/gates.jenkinsfile
@@ -82,7 +82,7 @@
 					stage ("Checkout") {
 						sh "sudo chown -R jenkins:users ."
 						env.GERRIT_PROJECT_URL = env.GIT_URL.replaceAll(/[^\/]+$/, env.GERRIT_PROJECT)
-						sh "printenv -0 | sort -z | tr '\0' '\n'"
+						sh "printenv -0 | sort -z | tr '\\0' '\\n'"
 
 						/*
 						 * Jenkins has already automatically checked out the base branch
diff --git a/CI/unittests.jenkinsfile b/CI/unittests.jenkinsfile
index 81ce1ab..8eb2615 100644
--- a/CI/unittests.jenkinsfile
+++ b/CI/unittests.jenkinsfile
@@ -84,7 +84,7 @@
 					stage ("Checkout") {
 						sh "sudo chown -R jenkins:users ."
 						env.GERRIT_PROJECT_URL = env.GIT_URL.replaceAll(/[^\/]+$/, env.GERRIT_PROJECT)
-						sh "printenv -0 | sort -z | tr '\0' '\n'"
+						sh "printenv -0 | sort -z | tr '\\0' '\\n'"
 
 						/*
 						 * Jenkins has already automatically checked out the base branch

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

Gerrit-Project: testsuite
Gerrit-Branch: 17
Gerrit-Change-Id: If62de37e6557c93def791002c2daf07a0e945977
Gerrit-Change-Number: 12726
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/25b372fc/attachment.html>


More information about the asterisk-code-review mailing list