diff options
author | Oliver Smith <osmith@sysmocom.de> | 2022-11-14 14:35:58 +0100 |
---|---|---|
committer | osmith <osmith@sysmocom.de> | 2022-11-15 11:38:08 +0000 |
commit | f560ce08ab3cc2000ca449d751f5ed424fd5bb72 (patch) | |
tree | db4dc96e0fc85b498632aa533f36d141abf809a0 /jobs/gerrit-verifications.yml | |
parent | 6b7741400def6920bfdfb8c6629b93e02d143e5a (diff) |
jenkins-gerrit: fix ambiguous use of review api
Fix an error when the same Change-Id is used on multiple branches or in
theory projects. This is actually allowed by gerrit, and we use this
e.g. when backporting patches from master.
Use the project, change number (e.g. 30147) and patchset number (e.g. 2)
instead of the Change-Id.
Fix for:
+ ssh -p 29418 -l jenkins gerrit.osmocom.org gerrit review 4835a62cd88f0d69db76fb3bfd2df02176a91a6d --json
fatal: "4835a62cd88f0d69db76fb3bfd2df02176a91a6d" matches multiple patch sets
Related: https://gerrit-review.googlesource.com/Documentation/cmd-review.html
Change-Id: I2d627f8f3b400fa57a50a228d47df2194f60fd08
Diffstat (limited to 'jobs/gerrit-verifications.yml')
-rw-r--r-- | jobs/gerrit-verifications.yml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/jobs/gerrit-verifications.yml b/jobs/gerrit-verifications.yml index 8649635..2bbfe4e 100644 --- a/jobs/gerrit-verifications.yml +++ b/jobs/gerrit-verifications.yml @@ -445,6 +445,9 @@ catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {{ env.PIPELINE_LINT_PASSED = "0" build job: 'gerrit-lint', parameters: [ + string(name: "GERRIT_PROJECT", value: "${{env.GERRIT_PROJECT}}"), + string(name: "GERRIT_CHANGE_NUMBER", value: "${{env.GERRIT_CHANGE_NUMBER}}"), + string(name: "GERRIT_PATCHSET_NUMBER", value: "${{env.GERRIT_PATCHSET_NUMBER}}"), string(name: "GERRIT_BRANCH", value: "${{env.GERRIT_BRANCH}}"), string(name: "GERRIT_HOST", value: "${{env.GERRIT_HOST}}"), string(name: "GERRIT_PATCHSET_REVISION", value: "${{env.GERRIT_PATCHSET_REVISION}}"), @@ -510,6 +513,9 @@ // comment + vote to gerrit script {{ build job: 'gerrit-pipeline-result', parameters: [ + string(name: "GERRIT_PROJECT", value: "${{env.GERRIT_PROJECT}}"), + string(name: "GERRIT_CHANGE_NUMBER", value: "${{env.GERRIT_CHANGE_NUMBER}}"), + string(name: "GERRIT_PATCHSET_NUMBER", value: "${{env.GERRIT_PATCHSET_NUMBER}}"), string(name: "GERRIT_BRANCH", value: "${{env.GERRIT_BRANCH}}"), string(name: "GERRIT_HOST", value: "${{env.GERRIT_HOST}}"), string(name: "GERRIT_PATCHSET_REVISION", value: "${{env.GERRIT_PATCHSET_REVISION}}"), |