-
Notifications
You must be signed in to change notification settings - Fork 56
Add support for Jenkins Pipeline. #21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Before this commit, if you attempted to use the Stash pull-request builder plug in with Jenkins Pipeline, you would encounter an error. Ultimately, this error was due to the fact that this plug in require jobs to use the AbstractProject base class, but the Jenkins Pipeline job class (WorkflowJob) doesn't. The good news is that WorkflowJob and AbstractProject share a base class of Job, and that most functionality of this plug in can be made available to WorkflowJob refactoring uses of AbstractProject to uses of Job instead. For cases where this does not provide enough functionality, there are interfaces implemented in common by both (ParameterizedJobMixIn.ParameterizedJob, Queue.Task) that fill the gaps. The one remaining piece of functionality this commit does not extend to be available to Jenkins Pipeline is custom post-build comments, so a TODO to that effect was added.
Thank you very much! This change is in productive use in our pull request pipeline - we encountered no issues. We would really like to see this on master. |
Working fine for us, next compiling this source. Would like to see this in master to get the oportunity to update if we like. |
I've opened nemccarthy#110 so that this can be merged there and propagate through to jenkinsci, if that's the preferred approach. |
when will this be merged? |
I'd also really love to see this beeing merged and made available via plugin manager. Thanks for this little but very important improvement. |
Merge this please :( |
This appears to have been merged as: |
@nemccarthy Make a release for us please ;) |
@nemccarthy do we have an ETA for the new release that supports the Jenkins Pipeline? |
@nemccarthy I am also looking for this release. Thanks :) |
@nemccarthy just to echo the above comments. Please release this! Thank you! |
anyone tested this PR? |
@nemccarthy Do you need help with this plugin development and release? |
Also would love this to be available! |
Any idea when this will land? |
I'm really waiting for this fix. i'm totally blocked in my pipeline jobs without this plugin. |
Any update on this? |
I think that this has been merged as nemccarthy#110. It's just that no release has been made yet. :-( |
@nemccarthy please make a release because the workaround by using an other job starting the pipeline with the same configuration has the result of an other node being in use constantly because it need's to wait on the pipeline being finished. |
Jumping in to check and see if there was an update. For the time being, would installing the updated .jar file from https://jenkins.ci.cloudbees.com/job/plugins/job/stash-pullrequest-builder-plugin/83/org.jenkins-ci.plugins$stash-pullrequest-builder/ be the way to go? |
Hello all, just a small question for users of this PRed feature: do you also use it with Organization folders (e.g. Bitbucket Team items) - can it then automatically generate MultiBranch Pipeline items (one per repo) and further pipelines per branch with a Jenkinsfile, all using this plugin for integration via Stash comments? In the vanilla plugin, I see there are settings for this but they give a stacktrace as detailed in the PR description so I had not yet looked further. |
@jimklimov this is incompatible with Organization folders as far as I can tell. For my part I just finished porting some of the features of this plugin into the Branch API build strategy concepts used by the Organization Folder plugins and I will be going into production with these in our CI in the new year. I hope to make a public release of these branch strategies to facilitate reclaiming some of the features lost from this plugin in the Org folders. |
@rhencke if you still intend to work on this please rebase your branch against current master to enable CI builds. |
@jakub-bochenski This work has been completed for quite some time and was already approved and merged on the author's personal fork, so unfortunately this commit is not a candidate for rebasing. |
Closing, we'll possibly revisit this later |
I've rebased the code on top of the master branch. It's available here: The code has only been compile tested at this time. I don't want to submit it as a pull request yet, as it conflicts with many small pull requests that should be merged first. Also, there are many changes in the patch that I would double check first. |
I don't see a problem with filling a PR now. Just mark it as "Work in Progress" if you are worried it would be merged prematurely. |
I think we need to carefully consider the Organization folders overlap. |
Submitted as #69. Please elaborate about the Organization folders on the new PR. Is that just an overlap in functionality, or some breakage introduced by the code? |
Before this commit, if you attempted to use the Stash pull-request
builder plug in with Jenkins Pipeline, you would encounter an error.
Ultimately, this error was due to the fact that this plug in require
jobs to use the AbstractProject base class, but the Jenkins Pipeline
job class (WorkflowJob) doesn't.
The good news is that WorkflowJob and AbstractProject share a base
class of Job, and that most functionality of this plug in can be made
available to WorkflowJob refactoring uses of AbstractProject to uses
of Job instead. For cases where this does not provide enough
functionality, there are interfaces implemented in common by both
(ParameterizedJobMixIn.ParameterizedJob, Queue.Task) that fill the
gaps.
The one remaining piece of functionality this commit does not extend
to be available to Jenkins Pipeline is custom post-build comments, so
a TODO to that effect was added.