From 8a27ad1ed16ec432265aeedf001e7fdc9fa920a7 Mon Sep 17 00:00:00 2001 From: Luca Milanesio Date: Fri, 3 Jan 2020 10:21:17 +0000 Subject: Fix gerrit-code-review plugin name The GerritSCMSource type for the multibranch pipeline does not belong to the 'gerrit' plugin but rather to the 'gerrit-code-review' plugin. Change-Id: I5edd81a3506847c3e5910ad66d4498a2b8c899e9 --- jenkins_jobs/modules/project_multibranch.py | 5 ++++- tests/multibranch/fixtures/scm_gerrit_full.xml | 2 +- tests/multibranch/fixtures/scm_gerrit_minimal.xml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/jenkins_jobs/modules/project_multibranch.py b/jenkins_jobs/modules/project_multibranch.py index 3761ddc1..2a7a3870 100644 --- a/jenkins_jobs/modules/project_multibranch.py +++ b/jenkins_jobs/modules/project_multibranch.py @@ -583,7 +583,10 @@ def gerrit_scm(xml_parent, data): source = XML.SubElement( xml_parent, "source", - {"class": "jenkins.plugins.gerrit.GerritSCMSource", "plugin": "gerrit"}, + { + "class": "jenkins.plugins.gerrit.GerritSCMSource", + "plugin": "gerrit-code-review", + }, ) source_mapping = [ ("", "id", "-".join(["gr", data.get("url", "")])), diff --git a/tests/multibranch/fixtures/scm_gerrit_full.xml b/tests/multibranch/fixtures/scm_gerrit_full.xml index 04c59aec..55cc9c88 100644 --- a/tests/multibranch/fixtures/scm_gerrit_full.xml +++ b/tests/multibranch/fixtures/scm_gerrit_full.xml @@ -31,7 +31,7 @@ - + gr-https://review.gerrithub.io/johndoe/foo https://review.gerrithub.io/johndoe/foo secret diff --git a/tests/multibranch/fixtures/scm_gerrit_minimal.xml b/tests/multibranch/fixtures/scm_gerrit_minimal.xml index 60959552..b29acd09 100644 --- a/tests/multibranch/fixtures/scm_gerrit_minimal.xml +++ b/tests/multibranch/fixtures/scm_gerrit_minimal.xml @@ -31,7 +31,7 @@ - + gr-https://review.gerrithub.io/johndoe/foo https://review.gerrithub.io/johndoe/foo -- cgit