Using multibranch pipelines with webhooks.

When I delete a branch my jenkins projects immediately update and prune the branch.

This is great but could I trigger a build of master branch when another branch is pruned?

Im asking for two things i guess:

  • Is it possible to trigger a build when a delete branch webhook is received?
  • Is it possible to trigger only a build of a specific branch?

I have some external cleanup I want to do when a branch it deleted. I could avoid cron or external scripts and just code this logic into the pipeline itself (assuming what I want is possible).

  • This will almost certainly need to be done with a webhook on your SCM server. What SCM are you using? Bitbucket, Github, ...? – jayhendren Nov 6 '18 at 19:51
  • a very similar question was just posted to serverfault: serverfault.com/questions/937893/… – jayhendren Nov 6 '18 at 19:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.