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

Git polling fails after detached head

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • git-plugin
    • git-client 1.2.0
      git 1.5.0

      Git polling depends on ‘last built’ revision. If the Jenkins job is triggered manually on different branch (detached head), the polling may result in No changes.

      WE have a Job which polls for changes every 5 mins. The branch is mentioned using a Parametrized plugin. Like,

      String parameter:
      name: GIT_COMMIT_TAG
      default: master

      The polling works fine. But when I run the job manually and set GIT_COMMIT_TAG to different value (which is detached head) the subsequent polling says "No changes" to build. The polling log says,

      Started on Feb 25, 2014 12:00:20 AM
      Using strategy: Default
      [poll] Last Built Revision: Revision 48c7cfd0bfd024abcf4e93142a78a019db0279aa (detached)
      Fetching changes from the remote Git repositories
      Fetching upstream changes from origin
      Polling for changes in
      Done. Took 1.9 sec
      No changes

      Git polling in this case will only start working after manual trigger of target branch 'master'

            markewaite Mark Waite
            dilipm79 Dilip Mahadevappa
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: