Closed nickbroon closed 7 years ago
This is also being tracked for the Bitbucket Cloud pullrequest builder plugin: https://issues.jenkins-ci.org/browse/JENKINS-31749
Jenkins file support would be awesome! Happy to take a PR on this one
+1
+10
+10
+100
+100
Would someone like to raise a PR for this feature?
Why is this closed? Because of lack of help?
+1 been trying to figure out how to get this to work w/ pipelines w/o luck
+1 need that too!
jenkinsci/stash-pullrequest-builder-plugin#21 looks to add support for this.
What would be the best way to get that pull request merged in? Further dev or testing needed?
I've opened nemccarthy/stash-pullrequest-builder-plugin#110 so that this can be merged here and propagate through to jenkinsci, if that's the preferred approach.
I've been bashing my head against this for a day or two. Is there any way we can get some movement? I'd be happy to build the plugin and patch it into our system to do some pre-merge QA if that'll help
Thanks for this @stebadge. @jkerry have you been able to test #110 ? if so then we can merge and release
Installing on our chef build server now. Stay tuned.
This looks good. I just ran our first successful PR build through it on a self-built HPI. IMO :shipit:
Working here as well on self-built HPI.
Any chance this change loses the ignoreSsl functionality? I have the checkbox checked but I'm getting this for both Pipeline and non-Pipeline jobs:
stashpullrequestbuilder.stashpullrequestbuilder.StashBuildTrigger.run() failed for org.jenkinsci.plugins.workflow.job.WorkflowJob@476de42b[job-name]
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:196)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:268)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:380)
Caused: sun.security.validator.ValidatorException: PKIX path building failed
I'm not seeing this problem on my other Jenkins instance that has the official 1.7.0 version, nor when I downgrade this Jenkins instance to 1.7.0 (although of course I have to use non-Pipeline jobs then).
Update: I gave up and imported our Stash SSL cert into the JVM cacerts file, and then the job ran (so this is clearly an issue). I've encountered other problems though so it doesn't seem like this is ready for primetime. Here is a short list:
Resolved by #110
When a pull request is created in bitbucket jenkins build does not get triggered. PullrequestID and other parameters are not passed from bitbucket pull request to jenkin job. I see in log below Exception.
Jul 16, 2018 10:50:00 AM org.apache.commons.httpclient.HttpMethodDirector processWWWAuthChallenge INFO: Failure authenticating with BASIC 'Atlassian Bitbucket'@bitbucketdc.***.net:443 Jul 16, 2018 10:50:00 AM stashpullrequestbuilder.stashpullrequestbuilder.stash.StashApiClient$1 call SEVERE: Failing to get response from Stash PR GET/rest/api/1.0/projects/SCPPAR/repos/asset-record/pull-requests java.util.concurrent.ExecutionException: java.lang.RuntimeException: Didn't get a 200 response from Stash PR GET! Response; 'Unauthorized' with message; null
Let me know how to fix this.
Would allow using this plugin programatically from a
Jenkinsfile
Details at: https://github.com/jenkinsci/pipeline-plugin/blob/master/COMPATIBILITY.md#plugin-developer-guide
Possibly as simple as replacing
AbstractBuild
withRun
stashnotifier-plugin is looking to implement similar support: https://github.com/jenkinsci/stashnotifier-plugin/issues/92
There is already a plugin that supports both BitBucket Cloud and Bitbucket Server/Stash along similar lines, though it's support for PR's is more limited, not supporting things like using the merge branch, etc and is restricted to multi-branch source type Jobs. https://github.com/jenkinsci/bitbucket-branch-source-plugin https://documentation.cloudbees.com/docs/cje-user-guide/bitbucket.html
It appears that @tjkierzkowski may have made a start on this:https://github.com/nemccarthy/stash-pullrequest-builder-plugin/compare/master...tjkierzkowski:pipeline_conversion?expand=1