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.