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

Friendly Automation asteriskteam at digium.com
Wed Feb 27 11:04:21 CST 2019


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

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: I2e8e3f213b9a96bb1b27665eca4a9a24bc49820e
(cherry picked from commit 5ce084579f897096163b4e0c2ed4e8e1a8558cca)
---
M tests/CI/gates.jenkinsfile
M tests/CI/unittests.jenkinsfile
2 files changed, 6 insertions(+), 6 deletions(-)

Approvals:
  George Joseph: Looks good to me, but someone else must approve; Verified
  Friendly Automation: Looks good to me, approved; Approved for Submit



diff --git a/tests/CI/gates.jenkinsfile b/tests/CI/gates.jenkinsfile
index 1f161d7..299bd10 100644
--- a/tests/CI/gates.jenkinsfile
+++ b/tests/CI/gates.jenkinsfile
@@ -67,7 +67,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)
 					
 						/*
 						 * Jenkins has already automatically checked out the base branch
@@ -90,10 +90,10 @@
 							checkout scm: [$class: 'GitSCM',
 								branches: [[name: env.GERRIT_BRANCH ]],
 								extensions: [
-									[$class: 'ScmName', name: 'gerrit-public'],
+									[$class: 'ScmName', name: env.GERRIT_NAME],
 									[$class: 'CleanBeforeCheckout'],
 									[$class: 'PreBuildMerge', options: [
-										mergeRemote: 'gerrit-public',
+										mergeRemote: env.GERRIT_NAME,
 										fastForwardMode: 'NO_FF',
 										mergeStrategy: 'RECURSIVE',
 										mergeTarget: env.GERRIT_BRANCH]],
diff --git a/tests/CI/unittests.jenkinsfile b/tests/CI/unittests.jenkinsfile
index f41577c..050cb8a 100644
--- a/tests/CI/unittests.jenkinsfile
+++ b/tests/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)
 
 						/*
 						 * Jenkins has already automatically checked out the base branch
@@ -91,10 +91,10 @@
 							checkout scm: [$class: 'GitSCM',
 								branches: [[name: env.GERRIT_BRANCH ]],
 								extensions: [
-									[$class: 'ScmName', name: 'gerrit-public'],
+									[$class: 'ScmName', name: env.GERRIT_NAME],
 									[$class: 'CleanBeforeCheckout'],
 									[$class: 'PreBuildMerge', options: [
-										mergeRemote: 'gerrit-public',
+										mergeRemote: env.GERRIT_NAME,
 										fastForwardMode: 'NO_FF',
 										mergeStrategy: 'RECURSIVE',
 										mergeTarget: env.GERRIT_BRANCH]],

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

Gerrit-Project: asterisk
Gerrit-Branch: 15
Gerrit-Change-Id: I2e8e3f213b9a96bb1b27665eca4a9a24bc49820e
Gerrit-Change-Number: 11050
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/20190227/b24ff372/attachment-0001.html>


More information about the asterisk-code-review mailing list