First some background, although my actual question is likely pretty simple.
I have a situation where there are two different jobs that could run for particular projects. I have a multibranch pipeline that runs for master and release branches, what I might call "target" branches,being the target of a merge. I also have a plain pipeline that gets spawned from BitBUcket for pull requests (using the "Pull Request Notification" BitBucket mechanism). This gets spawned for ordinary pull requests, but we also have "automerge" set for release branches, so when you merge a PR to a release branch, it automerges to master. That also results in a pull request, but the branch is a release branch. At the point the PR is merged to the release branch, it causes two builds to be spawned, one on the multibranch pipeline, and one on the plain pipeline. I'd really like to just skip the build on the plain pipeline in this case. There is no "branch filter" in the Pull Request Notification system, so the only time I can do something about this is in the pipeline script. It's simple to detect this situation in the pipeline script, but what I want to determine is how to abort the script automatically at this point without making it look like an "error". I don't know how to abort the entire pipeline script in the script itself, without throwing an exception. Throwing an exception doesn't seem quite right. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/95999a6a-51ed-431c-8db8-52e2bad83b19%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
