Jenkins pipline - how to access github webhook payload

181 Views Asked by At

Im trying to build a Jenkins pipeline which enforces gitflow. My requirements are that when there is a merge from the release branch (e.g. release/v1.0.0) to master i will use the same docker image that was created during the last commit on the release branch, before the merge commit (in other words, use latest image that was approved in staging).

I'm trying to figure out how to access the GitHub PullRequestEvent event payload in my groovy jenkins pipeline, so i can see if the source branch is a release branch and tag the container with the release version tag. Then I'll use them in my pipeline.

0

There are 0 best solutions below