[Asterisk-code-review] CI: Update jenkinsfiles with new Gerrit URLs (...testsuite[16.2])

Friendly Automation asteriskteam at digium.com
Wed Feb 27 11:19:32 CST 2019


Friendly Automation has submitted this change and it was merged. ( https://gerrit.asterisk.org/c/testsuite/+/11056 )

Change subject: CI: Update jenkinsfiles with new Gerrit URLs
......................................................................

CI: Update jenkinsfiles with new Gerrit URLs

The recent upgrade of Gerrit to 2.16 elimiated referencing a
repository in a way the jenkinsfiles were relying on so
the URL references were changed to a more consistent and supported
format.

Change-Id: Ibace79b3887f93875154ea1d73aa36548c5bd67e
(cherry picked from commit e879dd0cb5d94955d8454c4aa7cd82e930098314)
---
M CI/gates.jenkinsfile
M CI/unittests.jenkinsfile
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Friendly Automation: Looks good to me, approved; Approved for Submit



diff --git a/CI/gates.jenkinsfile b/CI/gates.jenkinsfile
index 9f42ec4..187eb74 100644
--- a/CI/gates.jenkinsfile
+++ b/CI/gates.jenkinsfile
@@ -65,7 +65,7 @@
 
 					stage ("Checkout") {
 						sh "sudo chown -R jenkins:users ."
-						env.GERRIT_PROJECT_URL = env.GERRIT_CHANGE_URL.replaceAll(/\/[0-9]+$/, "/${env.GERRIT_PROJECT}")
+						env.GERRIT_PROJECT_URL = env.GIT_URL.replaceAll(/[^\/]+$/, env.GERRIT_PROJECT)
 						sh "printenv | sort"
 
 						/*
diff --git a/CI/unittests.jenkinsfile b/CI/unittests.jenkinsfile
index 83ed1df..33be6b0 100644
--- a/CI/unittests.jenkinsfile
+++ b/CI/unittests.jenkinsfile
@@ -68,7 +68,7 @@
 
 					stage ("Checkout") {
 						sh "sudo chown -R jenkins:users ."
-						env.GERRIT_PROJECT_URL = env.GERRIT_CHANGE_URL.replaceAll(/\/[0-9]+$/, "/${env.GERRIT_PROJECT}")
+						env.GERRIT_PROJECT_URL = env.GIT_URL.replaceAll(/[^\/]+$/, env.GERRIT_PROJECT)
 						sh "printenv | sort"
 
 						/*

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

Gerrit-Project: testsuite
Gerrit-Branch: 16.2
Gerrit-Change-Id: Ibace79b3887f93875154ea1d73aa36548c5bd67e
Gerrit-Change-Number: 11056
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20190227/25b70a65/attachment-0001.html>


More information about the asterisk-code-review mailing list