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

Branch names in Multibranch jobs causing build failures

XMLWordPrintable

      Occasionally, forking a new branch in a git repo can cause immediate, unrelated and irreversible build failures.

      Our setup is a multibranch pipeline building each branch of the project for every commit. The repo is stored in Bitbucket.

      We recently created a 'release/6.0.0' branch from our master branch, and the build on that branch immediately failed with the following error:

      [ERROR] COMPILATION ERROR : 
      18:16:23 [INFO] -------------------------------------------------------------
      18:16:23 [ERROR] /root/workspace/enAM-Pipeline_release_6.0.0-YRZAEYTMSVCBGF6L6YJT7VNUKLPLU3KCUEIOE5P5NURDINYXJM4Q/openam-core/src/main/java/org/forgerock/openam/entitlement/SetupInternalNotificationSubscriptions.java:[55,73] cannot find symbol
      18:16:23   symbol:   class Consumer
      18:16:23   location: class org.forgerock.openam.entitlement.SetupInternalNotificationSubscriptions
      18:16:23 [INFO] 1 error
      

      The same commit built fine on master, the only change in git is the creation of this new branch, which gets a new job/branch in the multibranch pipeline to reflect that. Our builds run on fresh Docker containers (Yet Another Docker Plugin); the builds in question ran on the same physical host, at separate times.

      The problem is not ephemeral for the new branch - all future builds of that branch will be broken, with the same issue.

      Deleting the branch, removing it from the multibranch job, then re-creating the branch does not fix the issue

      The only approach that seems to work is to create another branch directly from the 'broken' one, with another name. For example, we created 'release/6.0.0b' (directly from 'release/6.0.0') and the build for that was fine.

      The only correlation I can see is with the branch name. We occasionally see this with PRs too - sometimes the builds for a PR seem irreversibly broken. Simply opening a new PR with the same code change fixes the problem

            Unassigned Unassigned
            robin_smith Robin Smith
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: