Skip to content
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

Closed
3 of 4 tasks
AlerantAppNGIN opened this issue Sep 19, 2019 · 13 comments
Closed
3 of 4 tasks
Labels

Comments

@AlerantAppNGIN
Copy link

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.

@AlerantAppNGIN AlerantAppNGIN changed the title Add bitbucket payload to environment variable How to reach a bitbucket post webhook payload json from a jenkins pipeline file? Sep 19, 2019
@tomasbjerre
Copy link

@OmriHarary
Copy link

OmriHarary commented Dec 9, 2019

I would also like to know this. This is functionality that I require.
If someone could provide some guidance on where to start, I would be happy to implement it if there's nothing in place already.

@stale
Copy link

stale bot commented Feb 7, 2020

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.

@stale stale bot added the stale label Feb 7, 2020
@duncwa
Copy link

duncwa commented Feb 12, 2020

Anyone get an answer to this question?

@stale stale bot removed the stale label Feb 12, 2020
@stale
Copy link

stale bot commented Apr 12, 2020

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.

@stale stale bot added the stale label Apr 12, 2020
@jetersen
Copy link
Member

The info is simply not exposed.

The closest you can get is CHANGE_TITLE, CHANGE_URL, CHANGE_AUTHOR, CHANGE_AUTHOR_DISPLAY_NAME, CHANGE_AUTHOR_EMAIL, CHANGE_FORK, CHANGE_BRANCH, CHANGE_TARGET, CHANGE_ID

@stale stale bot removed the stale label Apr 12, 2020
@stale
Copy link

stale bot commented Jun 11, 2020

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.

@stale stale bot added the stale label Jun 11, 2020
@stale stale bot closed this as completed Jun 18, 2020
@kchrusciel
Copy link

Any update on this? I want to trigger build after the pull request merge. But I want to pass also event data to Jenkins

@samsonmaconi
Copy link

@souris4science
Copy link

@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?

@duncwa
Copy link

duncwa commented Apr 26, 2021

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.

@Arunrajg
Copy link

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

@tomasbjerre
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants