You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
Hi!
We have a job in Jenkins which we want to trigger on push, but also on pull request opened and pull request branch updated. This job is configured to use the Generic Webhook Trigger plugin with a token.
However, by doing this, a push to the pull request branch also fires the regular push webhook. Whenever there is an event related to Pull Request, that is the payload we want, but we only receive the "repo:refs_changed" event. It seems that Jenkins only recieves the payload from one of the triggers.
10:10:00 Generic Cause 10:10:00 Generic Cause 10:10:00 GenericWebhookEnvironmentContributor 10:10:00 Received: 10:10:00 10:10:00 {"eventKey":"repo:refs_changed",.......}
As you can see on this log from jenkins, it has been triggered twice, which is correct (the push, and pull request branch updated event). Is there any way to add a delay to the push event on the webhook or somehow change the order the payloads are sent from Bitbucket so that we can continue or Jenkinsjob with the payload we want?
Thank you for your question!
Maybe it is a good case for the jenkins-job-trigger pipe:
script: - pipe: atlassian/jenkins-job-trigger:0.3.1 variables: JENKINS_URL: 'http://my-jenkinsio-host:8080/job' JENKINS_USER: $JENKINS_USER JENKINS_TOKEN: $JENKINS_TOKEN JOB_NAME: 'staging-awesome-project-job'
Best regards,
Oleksandr Kyrdan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.