0

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 acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.