How to use SCMEvent on multibranch-pipeline

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to use SCMEvent on multibranch-pipeline

Santiago Fraire Willemoës

Is it possible to trigger a job based on a SCMEvent?
I'd like something like:

```
when {
  SCMEvent() == "pr:merged"
}
```

Does anyone know how to do that?
I've checked bitbucket plugin and it is processing
those events, but I don't how to listen to them.

https://github.com/jenkinsci/bitbucket-branch-source-plugin/blob/d8e822773ddc35b455176386fbaf47650f259cd4/src/main/java/com/cloudbees/jenkins/plugins/bitbucket/hooks/NativeServerPullRequestHookProcessor.java#L73-L86

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/79250481-4182-4abe-8fac-b9d3fa77d3e3n%40googlegroups.com.