← frouo.com


CI

How to prevent Jenkins from launching a build every time a MR is approved

If you are using Gitlab Enterprise Edition (EE) and Jenkins for continuous integration you may have noticed that, by default, Jenkins triggers a build when a Merge Request is approved.

I personally don't find this useful. Indeed, approvals does not affect code so there no need to re-run the CI.

So, let's be green 🌱 and disable this option in Jenkins, it's easy:

  1. Go on your Jenkins project home page
  2. Click Configure on the left
  3. Uncheck Approved Merge Requets (EE-only)
  4. Finally, do not forget to Apply / Save!

step1 step2

Thank you

Hope it helps. Please drop a ❤️ on my Twitter post to show your support 🙏.

The source code for this blog is available on GitHub.