Fwd: How to detect on pull request merged with when conditions

18 views
Skip to first unread message

Santiago Fraire Willemoës

unread,
Sep 3, 2020, 8:21:20 AM9/3/20
to jenkins...@googlegroups.com

Hello everyone, I've been trying to trigger a build on a merged PR. This is different to triggering the branch that was merged to.

I have these conditions that are working fine
when {
branch "master"
}
or
when {
changeRequest()
}

But I'm missing something like:


when {
changeRequest(status = "merged")
}

Any idea how to do this? My objective is to do some cleanup of preview environments, in order to do this I need to know the PR ID.

I'm using bitbucket post webhook and in Jenkins I use "Bitbucket Branch Source Plugin". I know that the "event" is being sent to Jenkins because it is checked in the webhook.
Any suggestions?

Regards!
Reply all
Reply to author
Forward
0 new messages