Hello all jenkins users,

I'd like to have some advice on the best way to have a git hook triggering 
a job but only for some branches (hence the notion of "whitelisted 
branched").

The use case is that some old branches are not buildable by the job. Only 
some recent branches are. BUT some commit may be made to the old branches 
because we have to support old version of the software.

I would not like those commit to trigger my job.

I have a few possibilities but none suits me well:
- creating one job per branch to be built. That's a huge overhead and not 
maintainable
- configure the git hook not to trigger jenkins for the old branches. 
Simple BUT jenkins will still try to build the old branches once commit are 
made into them and a recent branch triggers the job (as by default the 
Jenkins git plugin builts all branches where commits have been made since 
the last job execution)
- configure the regexp for the branch to be built. I, hum... regexp... 
well.. no thanks ;)
- start a convention on branch naming (with a specifix prefix or suffix) so 
I can easily configure the regexp. It may be the best idea yet but some 
existing branches that have to be built do not match any convention.

So unless someone points me to a whitelist kind of filter for branches to 
be built, I think I 'll go with the last solution. Any idea ?

Regards
François

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/ab18f096-ca0b-4bb6-a02f-82f9da6cb4f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to