Keep it: Every branch will not build its first push. Remove it: Every branch will be built once when the projects runs indexing.
Headache if I don't, headache if I do. Decided to remove it. The SkipFirstBranchIndexing is flawed. It did not work the way I expected it to. søndag 13. juni 2021 kl. 19:53:09 UTC+2 skrev Sverre Moe: > 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/20b2e4bc-79c5-45cd-b193-af4a439927b7n%40googlegroups.com.
