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

Merge before build, reference is not a tree on second build

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • git-plugin
    • None
    • 2.176.2
      git-plugin 2.8.0

      Pipeline Jenkins build with

      SCM: GIT

      Branches to build: refs/tags/*_${RELEASE}_feature

      Additional Behaviours: Merge before build

       

      first polled build is ok (change is detected and merged), see log

      second build triggered by hand gets error (no change), see log

       

        1. Jenkinsfile
          0.2 kB
        2. config.xml
          3 kB
        3. first-good.txt
          11 kB
        4. second-bad.txt
          4 kB

          [JENKINS-59008] Merge before build, reference is not a tree on second build

          P K created issue -

          Mark Waite added a comment - - edited

          Is SHA-1 a487d775943bc781fc0425601a15cb7445c67c6a a valid SHA-1 in any of the repositories involved in the (failing) second job? For example, are you using a pipeline shared library and is that SHA-1 one of the commits in the pipeline shared library?

          Was able to answer my own question. That must be a valid SHA-1 in the repository since the first build succeeds using the same SHA-1

          Mark Waite added a comment - - edited Is SHA-1 a487d775943bc781fc0425601a15cb7445c67c6a a valid SHA-1 in any of the repositories involved in the (failing) second job? For example, are you using a pipeline shared library and is that SHA-1 one of the commits in the pipeline shared library? Was able to answer my own question. That must be a valid SHA-1 in the repository since the first build succeeds using the same SHA-1

          Mark Waite added a comment -

          I don't know how to duplicate the conditions you're seeing. Refer to the JENKINS-51638 verification job and its contributor branch in the JENKINS-51638-project-1 branch for an example of what I've attempted.

          Does the "branches to build" need to be a tag? Does it behave differently if you use a branch instead of a tag? My test case did not attempt to use a tag, just two branches.

          Mark Waite added a comment - I don't know how to duplicate the conditions you're seeing. Refer to the JENKINS-51638 verification job and its contributor branch in the JENKINS-51638-project-1 branch for an example of what I've attempted. Does the "branches to build" need to be a tag? Does it behave differently if you use a branch instead of a tag? My test case did not attempt to use a tag, just two branches.
          Mark Waite made changes -
          Assignee Original: Mark Waite [ markewaite ]

          P K added a comment -

          it should be a tag for my project and i can reproduce the error. i'll try branch later on.

          P K added a comment - it should be a tag for my project and i can reproduce the error. i'll try branch later on.

          Mark Waite added a comment -

          Can you provide the config.xml of the job? The failure mode is surprising, though it may be similar to a recent report related to tags and merges.

          Mark Waite added a comment - Can you provide the config.xml of the job? The failure mode is surprising, though it may be similar to a recent report related to tags and merges.
          P K made changes -
          Attachment New: config.xml [ 48383 ]

          P K added a comment -

          see the config attached...

          P K added a comment - see the config attached...
          Mark Waite made changes -
          Assignee New: Mark Waite [ markewaite ]
          Mark Waite made changes -
          Summary Original: Merge before build, reference is not a tree on second build New: Merge before build, reference is not a tree on second build if merge target is a tag

            Unassigned Unassigned
            petekol P K
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: