mohamicorp / stash-jenkins-postreceive-webhook

Webhook used to notify Jenkins when commits are made to Stash
Other
138 stars 98 forks source link

Enable "Trigger Build" button to rerun a build #64

Closed jimCresswell closed 10 years ago

jimCresswell commented 10 years ago

Currently the "trigger build" button triggers Jenkins to poll Stash, if a build has already completed for a given commit Jenkins will not rerun that build.

The Jenkins Git plugin API can take a SHA as a parameter. Would it be possible to have the plugin calculate the most recent SHA in a pull request and have Jenkins rebuild that commit when the "trigger build" button is pressed?

Would it also be possible to provide a configuration option so that rather than sending the SHA of the source branch the plugin sent the SHA of the merge product of the source and target created by Stash (refs/pull-requests/*/merge)?

I can provide use cases and details if that would be helpful.

Thanks, Jim

mikesir87 commented 10 years ago

Cool! I must have missed the release notes about the SHA not requiring polling anymore. That'll be a nice addition.

In relation to these requests, can you go ahead and open up an issue for the second request, since these are really two distinct requests? That'll make it easier to keep track of progress and discussions won't get mixed up. (I'd do it myself, but like having the original owner for the idea be the issue creator)

jimCresswell commented 10 years ago

Sure, no problem, raised as #65.

On 28 April 2014 14:00, Michael Irwin notifications@github.com wrote:

Cool! I must have missed the release notes about the SHA not requiring polling anymore. That'll be a nice addition.

In relation to these requests, can you go ahead and open up an issue for the second request, since these are really two distinct requests? That'll make it easier to keep track of progress and discussions won't get mixed up. (I'd do it myself, but like having the original owner for the idea be the issue creator)

— Reply to this email directly or view it on GitHubhttps://github.com/Nerdwin15/stash-jenkins-postreceive-webhook/issues/64#issuecomment-41554859 .

mindjiver commented 10 years ago

@jimCresswell We just figured out that we need this at $DAY_JOB as well. Have you started working on it? Otherwise I might have a go.

jimCresswell commented 10 years ago

@mindjiver that's fine with me, copying @mikesir87 to make sure he is aware.

mikesir87 commented 10 years ago

I haven't had a chance to start working on this yet. Feel free to take a stab at it and let me know if you need any help along the way. Much appreciated!

jimCresswell commented 10 years ago

@mindjiver any thoughts on this? If you don't have time let me know and I'll see what we can do this end!

mindjiver commented 10 years ago

@jimCresswell I started to have a look but I was swamped by other things. Please go a head if you have some time :)

jimCresswell commented 10 years ago

@mindjiver it will probably be at least a week before I can take a look, I'll let you know if I start :)

KurtPattyn commented 10 years ago

I suffer from the same problem. I have been testing the sha1 as parameter and that works flawlessly. Any idea when this feature can be released?

jimCresswell commented 10 years ago

I'm not likely to have time to work on this On 26 Jul 2014 21:15, "Kurt Pattyn" notifications@github.com wrote:

I suffer from the same problem. I have been testing the sha1 as parameter and that works flawlessly. Any idea when this feature can be released?

— Reply to this email directly or view it on GitHub https://github.com/Nerdwin15/stash-jenkins-postreceive-webhook/issues/64#issuecomment-50247234 .

mikesir87 commented 10 years ago

This issue has been resolved from the pull request #71. You should expect an update to the plugin shortly.

KurtPattyn commented 10 years ago

This is cool! Thank you very much for the effort!