Skip to content
Snippets Groups Projects
Commit 5ce08457 authored by George Joseph's avatar George Joseph
Browse files

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
parent a8d4f56c
No related branches found
No related tags found
No related merge requests found
...@@ -79,7 +79,7 @@ pipeline { ...@@ -79,7 +79,7 @@ pipeline {
stage ("Checkout") { stage ("Checkout") {
sh "sudo chown -R jenkins:users ." 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 * Jenkins has already automatically checked out the base branch
...@@ -102,10 +102,10 @@ pipeline { ...@@ -102,10 +102,10 @@ pipeline {
checkout scm: [$class: 'GitSCM', checkout scm: [$class: 'GitSCM',
branches: [[name: env.GERRIT_BRANCH ]], branches: [[name: env.GERRIT_BRANCH ]],
extensions: [ extensions: [
[$class: 'ScmName', name: 'gerrit-public'], [$class: 'ScmName', name: env.GERRIT_NAME],
[$class: 'CleanBeforeCheckout'], [$class: 'CleanBeforeCheckout'],
[$class: 'PreBuildMerge', options: [ [$class: 'PreBuildMerge', options: [
mergeRemote: 'gerrit-public', mergeRemote: env.GERRIT_NAME,
fastForwardMode: 'NO_FF', fastForwardMode: 'NO_FF',
mergeStrategy: 'RECURSIVE', mergeStrategy: 'RECURSIVE',
mergeTarget: env.GERRIT_BRANCH]], mergeTarget: env.GERRIT_BRANCH]],
......
...@@ -80,7 +80,7 @@ pipeline { ...@@ -80,7 +80,7 @@ pipeline {
stage ("Checkout") { stage ("Checkout") {
sh "sudo chown -R jenkins:users ." 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 * Jenkins has already automatically checked out the base branch
...@@ -103,10 +103,10 @@ pipeline { ...@@ -103,10 +103,10 @@ pipeline {
checkout scm: [$class: 'GitSCM', checkout scm: [$class: 'GitSCM',
branches: [[name: env.GERRIT_BRANCH ]], branches: [[name: env.GERRIT_BRANCH ]],
extensions: [ extensions: [
[$class: 'ScmName', name: 'gerrit-public'], [$class: 'ScmName', name: env.GERRIT_NAME],
[$class: 'CleanBeforeCheckout'], [$class: 'CleanBeforeCheckout'],
[$class: 'PreBuildMerge', options: [ [$class: 'PreBuildMerge', options: [
mergeRemote: 'gerrit-public', mergeRemote: env.GERRIT_NAME,
fastForwardMode: 'NO_FF', fastForwardMode: 'NO_FF',
mergeStrategy: 'RECURSIVE', mergeStrategy: 'RECURSIVE',
mergeTarget: env.GERRIT_BRANCH]], mergeTarget: env.GERRIT_BRANCH]],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment