This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      After digging through the source code of the Branch API plugin I came across the following logic to evaluate the triggering of automatic builds based on Build Strategies, https://github.com/jenkinsci/branch-api-plugin/blob/master/src/main/java/jenkins/branch/MultiBranchProject.java#L2246-L2257

      Apparently this logic will trigger a branch build with a short-circuit OR, meaning if I have two strategies returning false and one returning true the branch build will be triggered no matter what.

      A clear example of the situation above and the problems it brings is the use of the strategy jenkins.branch.buildstrategies.basic.SkipInitialBuildOnFirstBranchIndexing. After the first build, it will always return true, which in turn will make all other strategies, like jenkins.branch.buildstrategies.basic.ChangeRequestBuildStrategyImpl useless, even if it returns false. 

            Assignee:
            Unassigned
            Reporter:
            R. Duval
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: