Search code examples
jenkinsjenkins-pipelinejenkins-plugins

Jenkins skip automatic triggering for job


I have a project which has multiple jenkins files and a jenkins with the bitbucket team plugin. The whole point is to separate staging from release. When I push on bitbucket a change on a branch that both jobs monitor ( lets say master ) then both jobs will trigger as expected. I would like to disable this trigger on one of the jobs and force it to be manual only (lets say on job A which is the release. The jenkinsfile defined the release process but should be run only manually ) .

so far in the team configuration I cannot stop the trigger but neither in a jenkinsfile I can set a property ( this#ignorePostCommitHooks ) and make it work. ( I do setup it. But it does nothing ). Is there a way to configure the job triggering?

Also a side question, Jenkins offers this optionskip initial build on first branch indexing

But even after setting it when I save the configurations and jenkins starts looking in the repository for matching projects / branches it will start building any branch it finds. Is there a way for this option to actually work?

Thank you in advance.


Solution

  • Wrapping it into an all match make it work.

    worked