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

Not able to build changes in multipipeline branch

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • Jenkins version: 2.219
      Gerrit Code Review Plugin: 0.41
      Gerrit Version: 3.1.2
      Gerrit Trigger Version: 2.30.3
      Gerrit Check Plugin: 6fa8c9683d
      Gerrit Webhook: 3.1.2

      Jenkins won't build the changeset even it can successfully detect it.

      The configuration in Jenkins is as below:

      ---Within Repository---

      Discover open changes

      ---Additional---

      Specify ref specs

      > +refs/heads/*:refs/remotes/@{remote}/*

      > +refs/changes/*:refs/remotes/@{remote}/*
      I am not sure what breaks the changes

       

      The multipipeline branch log is as below:

      > git rev-parse --is-inside-work-tree # timeout=10
      Setting origin to https://example.com/myrepo
      > git config remote.origin.url https://example.com/myrepo # timeout=10
      Fetching origin...
      Fetching upstream changes from origin
      > git --version # timeout=10
      > git config --get remote.origin.url # timeout=10
      using GIT_SSH to set credentials gerrit robot
      > git fetch --tags --progress origin +refs/heads/:refs/remotes/origin/ refs/changes/22/122/2:refs/remotes/origin/22/122/2 # timeout=10
      > git rev-parse --is-inside-work-tree # timeout=10
      Setting origin to https://example.com/myrepo
      > git config remote.origin.url https://example.com/myrepo # timeout=10
      Fetching & pruning origin...
      Fetching upstream changes from origin
      > git --version # timeout=10
      > git config --get remote.origin.url # timeout=10
      using GIT_SSH to set credentials gerrit robot
      > git fetch --tags --progress --prune origin +refs/heads/:refs/remotes/origin/ refs/changes/22/122/2:refs/remotes/origin/22/122/2 # timeout=10
      Seen branch in repository origin/master
      Seen 1 remote branch
      Checking 1 branches ...
      Filtered 1 branches ...
      Checking branch master
      ‘Jenkinsfile’ found
      master meets the criteria
      > git rev-parse --is-inside-work-tree # timeout=10
      Setting origin to https://example.com/myrepo
      > git config remote.origin.url https://example.com/myrepo # timeout=10
      Fetching origin...
      Fetching upstream changes from origin
      > git --version # timeout=10
      > git config --get remote.origin.url # timeout=10
      using GIT_SSH to set credentials gerrit robot
      > git fetch --tags --progress origin +refs/heads/master:refs/remotes/origin/master # timeout=10
      No changes detected: master (still at 20e02616cfc6e43867d17b322ee09509ea56002f)
      Processed 0 branches
      Processed 0 changes
      [Wed Feb 05 09:51:51 MYT 2020] Finished branch indexing. Indexing took 0.88 sec
      Finished: SUCCESS

          [JENKINS-60965] Not able to build changes in multipipeline branch

          honghan wong added a comment - - edited

          I just removed the +refs/heads/*:refs/remotes/@{remote}/* in Specify ref spec and it starts working, its different from this video they demonstrate

          JenkinsWorld2018

          So in my scenario the plugin works in this case.

          In Specify ref specs, add refs/changes and remove refs/heads, in any other case it won't work.

           

          honghan wong added a comment - - edited I just removed the +refs/heads/*:refs/remotes/@{remote}/* in Specify ref spec and it starts working, its different from this video they demonstrate JenkinsWorld2018 So in my scenario the plugin works in this case. In Specify ref specs, add refs/changes and remove refs/heads, in any other case it won't work.  

          honghan wong added a comment -

          Following the setting, I found out if we only use refs/changes/*, the master branch is not getting fetch and build.

           

          If we use both ref spec (refs/heads/* and refs/changes/*), then only the master branch is getting build, the changes won't build even it got fetched to jenkins.

          honghan wong added a comment - Following the setting, I found out if we only use refs/changes/*, the master branch is not getting fetch and build.   If we use both ref spec (refs/heads/* and refs/changes/*), then only the master branch is getting build, the changes won't build even it got fetched to jenkins.

          tiainpa added a comment -

          Any update to this?

          tiainpa added a comment - Any update to this?

            Unassigned Unassigned
            honghan_tt honghan wong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: