Hello, I have a jenkins + git build environment . Currently my builds are configured to poll for scm changes in every 5 minutes, if it detects a change, builds gets triggered. To get rid of the scm polling, I have configured a post-receive git hooks.
I have the below command inside the hook, curl http://jenkins.abc.com:8081/git/[email protected]:test-repo.git This works great and it schedules the job if "poll SCM" option is enabled. But the problem is I have two pipeline jobs, one for master branch and one for release branch. When i configured the Jenkins polling, it polls and detects the changes in correct branch and schedules only that job. But with the post-receive hook, my both jobs are getting scheduled . I don't want that. If the changes are pushed to master, I want only job configured for master branch should be scheduled or changes are pushed to release i want only job configured to release branch should be scheduled. How can i do this? Can anyone help me to resolve this issue? Thanks, M -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
