3

I need to preventing from build the specific job on specific conditions, how i can do this?

Pushing to specific repository and push to git using git push --no-verify

git commit -m "check" git push --no-verify

disable build job automatically when i push to specific branch in specific repo

Lidor Abu
  • 31
  • 1
  • 3
  • If I understand correctly, you are pushing commit to repository which trigger CI job to build the application. I guess it is rather problem with your CI configuration. What CI tool do you use? Maybe turning build off for specific branch or for all branches apart from master / developer will resolve issue? – Bear Sep 04 '19 at 14:22
  • I need to prevent from build in specific branch in "x" repo with jenkins CI integration server but in jenkins i have not option to do this , i have only option to listen to the repo and this is the problem. – Lidor Abu Sep 04 '19 at 14:37
  • I think we have possible duplication here of: https://stackoverflow.com/questions/21314632/how-to-exclude-git-branch-from-building-in-jenkins https://stackoverflow.com/questions/17155249/jenkins-gerrit-trigger-on-all-branches-except-master/18709097#18709097 – Bear Sep 04 '19 at 14:38
  • It’s not working with github webhook, why? – Lidor Abu Sep 05 '19 at 03:46
  • Similarly how I ignore from git webhooks when I using git push, have a way to do it? – Lidor Abu Sep 05 '19 at 03:51

1 Answers1

5

If you go into webhook settings on your repository, there should be an Active section where you can disable for as long as you like. enter image description here

CalculatingKraken
  • 651
  • 1
  • 9
  • 20