I tried to add a BuildStrategy to the BranchSource, to skip the first 
branch indexing.

I did this to avoid Jenkins to build all branches after changing the SCM 
configuration.
Otherwise Jenkins would have to build 400+ repositoris with 20-30 branches 
in each.

    final def buildStrategies = new ArrayList()
    final def skipInitialBuildStrategy = new 
SkipInitialBuildOnFirstBranchIndexing()
    buildStrategies.add(skipInitialBuildStrategy)
    branchSource.setBuildStrategies(buildStrategies)
            
However this seems not just to skip the first branch indexing for the 
repository, but for all new branches.

All new branches are no longer being built automatically, until the next 
branch indexing is triggered.

First branch indexing should just skip the first indexing, not all other 
indexing where there is a new branch.

I think maybe I just need to remove this and have Jenkins build everything.
Thankfully I can run a script to abort all jobs forcefully, but that is a 
lot of work.

Am I expecting a different behaviour for this Build Strategy?

All I want is to avoid building everything when we change the SCM 
configuration.
It is not something we do often though.

-- 
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/42b6d07b-65df-4cc6-aa10-56b13259cd6bn%40googlegroups.com.

Reply via email to