ashwanthkumar / gocd-build-github-pull-requests

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

Only latest Gerrit commit built #47

Open jozefs opened 9 years ago

jozefs commented 9 years ago

Hi,

It seems that this plugin only builds the latest commit pushed for review on Gerrit. For example, if I push 5 commits for review to the master branch at one time, the pipeline is triggered only once.

I was wondering if this was intentional, a bug or a misconfiguration on my part? The usual Gerrit workflow is per-commit, where every commit has to be built, tested and correct. In this model, every single pushed commit is supposed to be built by the pipeline and the Verified label set to +1 or -1.

On a related note, I'm currently using Gerrit's HTTP API via curl from Go to set the Verified +1/-1 of each commit. It's a bit of a workaround, but it works well except for the above mentioned issue.

Thanks!

srinivasupadhya commented 9 years ago

When i wrote gerrit plugin i assumed one review (change-set) can have only one commit. when you make a new commit on an existing review it becomes a new review. There are some shortcomings in the current feature-branch support & hence you will only see the top commit of the new review on UI, but the code is checked-out to that commit & hence contains other commits as well.

On a related note, I'm currently using Gerrit's HTTP API via curl from Go to set the Verified +1/-1 of each commit. It's a bit of a workaround, but it works well except for the above mentioned issue.

it would be great if you could provide me details of the API so i could implement Gerrit status notifier here.

srinivasupadhya commented 9 years ago

I added support for gerrit status notifer.

jozefs commented 9 years ago

Sorry for the long silence. I've read the shortcomings you linked to, and it looks like https://github.com/gocd/gocd/pull/939 was supposed to be the change that adds support for building multiple Git commits. However, that pull request seems to have been closed before it was merged. Can you please clarify which pull request or issue in gocd references the multiple commit build issue?

I've also had a chance to test the Gerrit status notifier plugin and I'll provide some feedback in its repository.