ashwanthkumar / gocd-build-github-pull-requests

GoCD plugin to build PRs for a Github repo
95 stars 72 forks source link

not existing revision ID used #161

Open weaky opened 3 years ago

weaky commented 3 years ago

I use Gerrit Change Set plugin 1.4.0-RC4 and Gerrit Change Set status notifier 1.7.0-107 I have created a pipeline B which has two materials, one is a gerrit repo 1, second is a upstream pipeline A which has a different gerrit repo 2 as material. Pipeline B fetches a build artifact from pipeline A. If pipeline A has been successfully run, pipeline B starts, but with a gerrit revision which does not exist. If I manually trigger pipeline B with an existing repo 1 number, it works perfect, also if I upload a change to gerrit repo 1, it triggers automatically with correct revision.

I think the problem has to do with this: The plugin materials of the repos are based on a devel branch. If a merge to the master branch is done, pipeline starts with a revision ID which only is temporary.

weaky commented 3 years ago

ok, it´s not depending on specific branch: If review is merged, pipeline is triggered with non/never existing revision id: If I copy revision id shown in VSM view, and search for it in gerrit web UI, it is not found. If I run pipeline manually with revision id copied from gerrit web UI after the merge is shown in web UI, it works. But this is a different revision id!

weaky commented 1 month ago

The problem is that a pipeline which has Gerrit material triggers not only after a commit and push, but also after each time when a review is done or comment added and the Save button pressed in the Gerrit UI. In this case, the Gerrit Change ID on which GoCD triggers, does not exist (in Gerrit UI, a search on the Change ID shows empty), and the gerrit content is not cloned. Sometimes there is one file cloned which seems automatically from Gerrit created with a UUID as filename which contains some text from Gerrit created like "update ...".