nemccarthy / stash-pullrequest-builder-plugin

A Jenkins plugin for Building Stash Pull Requests
https://wiki.jenkins-ci.org/display/JENKINS/Stash+pullrequest+builder+plugin
Other
64 stars 130 forks source link

Only run the jenkins job if the "test this please" phrase is in the comment #11

Closed trevan closed 9 years ago

trevan commented 9 years ago

I would like to create two types of pull request jobs. One would run every time a pull request is created and modified and the other would only run if requested. I'm thinking that if this plugin could be configured to only run if the "test this please" comment existed in stash, then I would be able to fire off the second job on an as needed basis.

It would also be nice to have PR #8 so that both jobs could have their own "test this please" comment.

nemccarthy commented 9 years ago

Would be nice to have this as a check box like say Build on a schedule, don't have the time ATM to work on this one, happy to take a PR! :)

I'll merge in PR #8 and get a build out.

nemccarthy commented 9 years ago

If you add a check box, Only build on comment (default to false), then you should just be able to add an IF block before this line which if true would set the shouldBuild = false and leave the comment if to then set it back to true. This really needs to be cleaned up but this would be the quick and dirty. There is probably story around only allowing certain users to request the build too... Anyway, leave that for another day...

https://github.com/nemccarthy/stash-pullrequest-builder-plugin/blob/master/src/main/java/stashpullrequestbuilder/stashpullrequestbuilder/StashRepository.java#L167

trevan commented 9 years ago

ok, I'll look into that.

nemccarthy commented 9 years ago

coming in v1.1.0

nemccarthy commented 9 years ago

Version 1.1.0 Release. Should be in Jenkins Update Centre in a few hours.