Closed stebadge closed 7 years ago
Can we get a release for this?
HI, When it can be released?
Hi, Can we get a release of this.. with support for pipeline ?
Is there a reason this hasn't been released? @nemccarthy
@stebadge Do you mind sharing a sample jenkinsfile using this plugin? It will be useful for others too . I will add the details to the ReadMe once i have it working.
It's not really about the jenkins file @praveen12bnitt . You can use any jenkinsFile you please.
I ended up taking the fixes, building them locally and then installing it to my jenkins box manually, as many others mentioned above. It seems to work great for me. I'd prefer to use hooks, but, I haven't the allotted time to upgrade the plugin.
@stebadge @bcfisher Can you share how you used this in pipeline? I'm trying to use it in the properties step in pipelineTrigger as the pipeline code generator syntax states, but I'm getting an error:
Caused: java.lang.IllegalArgumentException: Could not instantiate {triggers={$class=StashBuildTrigger, projectPath=, cron= *, stashHost=xxxxxxxxxx, credentialsId=xxxxxxxxxxxx, projectCode=xxxxxxxx, repositoryName=env.GIT_URL, ciSkipPhrases=NO TEST, ciBuildPhrases=test this please, ignoreSsl=false, checkDestinationCommit=false, checkMergeable=false, mergeOnSuccess=false, checkNotConflicted=false, onlyBuildOnComment=false, deletePreviousBuildFinishComments=false, cancelOutdatedJobsEnabled=false}} ...
This is the code I have in properties
pipelineTriggers([stashBuildTrigger(projectPath: '', cron: ' ', stashHost: xxxxx', credentialsId: 'xxxxxxxx', projectCode: 'xxxxx' /"${project_name}"*/, repositoryName: 'env.GIT_URL', ciSkipPhrases: 'NO TEST', ciBuildPhrases: 'test this please', ignoreSsl: false, checkDestinationCommit: false, checkMergeable: false, mergeOnSuccess: false, checkNotConflicted: false, onlyBuildOnComment: false, deletePreviousBuildFinishComments: false, cancelOutdatedJobsEnabled: false)])])
I didn't add it to the jenkinsFile, but instead, from the ui.
@bcfisher Oh Ok. Was it in the UI of the multibranch pipeline job? I tried that but got a class cast exception.
no, just a pipeline job
and then in the pipeline job, I configured the stash pull request builder there. E.g.
Had any one run the latest version of master successfully ? Looking for release that supports pipeline.
@kikuingithub yeah it works. But it doesn't work with the multibranch pipeline job.
I switched over to pipeline job but I still need regular branches to build and so far I have not been able to get the job to work to build both PRs and branches. If anyone has any insight let me know.
Anybody else having problems aborting running pipeline jobs? We have turned on the option "Rebuild if destination branch changes" together with "Cancel outdated jobs". When the destination branch changes, it triggers new pipeline builds, which is correct, but the outdated builds don't abort.
To be clear, we run the non-released version of the plug-in, in which pipeline jobs are supported.
Was this released yet as an official version? If not, is there a planned date?
I have submitted a PR for the current code, please see https://github.com/jenkinsci/stash-pullrequest-builder-plugin/pull/69
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.