diff options
author | Luca Milanesio <luca.milanesio@gmail.com> | 2020-01-03 10:21:17 +0000 |
---|---|---|
committer | Luca Milanesio <luca.milanesio@gmail.com> | 2020-01-03 10:43:47 +0000 |
commit | 8a27ad1ed16ec432265aeedf001e7fdc9fa920a7 (patch) | |
tree | df02a8cf87da3d40cf8c0c2c47bd0c4b01d7816f | |
parent | 497198a2528fd14eebfa5de5f4798c92dd09603a (diff) | |
download | python-jenkins-job-builder-8a27ad1ed16ec432265aeedf001e7fdc9fa920a7.tar.gz python-jenkins-job-builder-8a27ad1ed16ec432265aeedf001e7fdc9fa920a7.tar.xz python-jenkins-job-builder-8a27ad1ed16ec432265aeedf001e7fdc9fa920a7.zip |
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
-rw-r--r-- | jenkins_jobs/modules/project_multibranch.py | 5 | ||||
-rw-r--r-- | tests/multibranch/fixtures/scm_gerrit_full.xml | 2 | ||||
-rw-r--r-- | 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 @@ <sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api"> <data> <jenkins.branch.BranchSource> - <source class="jenkins.plugins.gerrit.GerritSCMSource" plugin="gerrit"> + <source class="jenkins.plugins.gerrit.GerritSCMSource" plugin="gerrit-code-review"> <id>gr-https://review.gerrithub.io/johndoe/foo</id> <remote>https://review.gerrithub.io/johndoe/foo</remote> <credentialsId>secret</credentialsId> 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 @@ <sources class="jenkins.branch.MultiBranchProject$BranchSourceList" plugin="branch-api"> <data> <jenkins.branch.BranchSource> - <source class="jenkins.plugins.gerrit.GerritSCMSource" plugin="gerrit"> + <source class="jenkins.plugins.gerrit.GerritSCMSource" plugin="gerrit-code-review"> <id>gr-https://review.gerrithub.io/johndoe/foo</id> <remote>https://review.gerrithub.io/johndoe/foo</remote> <credentialsId/> |