Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-75318

Include region multibranch pipeline build strategy does not stop build triggers

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major

      Similar to https://issues.jenkins.io/browse/JENKINS-73598, I'm not seeing this plugin work for its basic use case. I have defined a simple include region (one file, no wildcards) for an "Accept build by included regions strategy" build strategy, with no exclude regions section. I would expect builds to trigger only when that one file is changed. Instead, changes to any file triggers a build.

      Unlike 73598, I'm not using the pollSCM trigger, but rather a multibranch pipeline configured using the Job DSL. The pipeline uses the GitHub branch source pointing to an internally hosted Github instance that discovers branches and forks. The builds I'm running are all part of a PR that references a fork.

      The actual bug shows up in the Jenkins log as:

      Feb 20, 2025 5:09:36 PM SEVERE com.igalg.jenkins.plugins.multibranch.buildstrategy.AbstractBranchBuildStrategy isAutomaticBuild

      Unexpected exception: java.io.IOException: Unable to retrieve changes

      A quick look at AbstractBranchBuildStrategy.java:98 reveals that when an exception is thrown in isAutomaticBuild, the check is functionally bypassed.

      I'm not sure what's causing the exception to be thrown, but from the user perspective, it appears like the plugin is non-functional.

          [JENKINS-75318] Include region multibranch pipeline build strategy does not stop build triggers

          There are no comments yet on this issue.

            igalg Igal Gluh
            jaywagner Jay Wagner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: