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
How to reach a bitbucket post webhook payload json from a jenkins pipeline file? #229
Comments
This is what https://github.com/jenkinsci/generic-webhook-trigger-plugin/ does. |
I would also like to know this. This is functionality that I require. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Anyone get an answer to this question? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The info is simply not exposed. The closest you can get is |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Any update on this? I want to trigger build after the pull request merge. But I want to pass also event data to Jenkins |
This works for me https://github.com/jenkinsci/generic-webhook-trigger-plugin/ |
@samsonmaconi can you elaborate more on this? How did you manage to use generic webhook trigger in a multibranch pipeline using the Bitbucket Source Branch plugin? e.g. when a PR job is triggered how did you retrieve the data sent in the webhook request? |
I have used the danger gem to access the Bitbucket and GitHub pr json key value pairs and then post those in slack. In a multi branch pipeline pr you get automatic updates to your pr status using the octokit gem for github. |
Any update on this? Bitbucket payload provides us useful information. Can this payload be exposed? https://github.com/jenkinsci/generic-webhook-trigger-plugin/ does not work for Multibranch Pipeline Jobs |
It does work for multibranch, from the readme: This plugin can be used in the jobs created by the Pipeline Multibranch Plugin. If you are looking for a way to trigger a scan in the Pipeline Multibranch Plugin you can use the Multibranch Scan Webhook Trigger Plugin. |
Your checklist for this issue
Jenkins version: 2.176.2
Plugin version: 2.4.4
Bitbucket cloud
Bitbucket server and version: Atlassian Bitbucket 5.14.1
Description
I'd like to find a way to use the payload json received from a native BitBucket server's Post webhook in a Jenkins pipeline file.
As far as I can see, the payload json is received by the BitbucketSCMSourcePushHookReceiver.doNotify() method. Perhaps a possible solution would be to pass the entire payload to an environment variable and then use this variable from the pipeline file.
Please help me how to achieve this goal.
BR.
The text was updated successfully, but these errors were encountered: