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

SCM Polling uses last polled branch always

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • pipeline
    • None

      Similar to https://issues.jenkins-ci.org/browse/JENKINS-50168 and https://issues.jenkins-ci.org/browse/JENKINS-27327  BUT both of those tickets got distracted with the parameterized branch name, while the polling branch issue I think is distinct.

       

      Problem:

      When using pollscm in a pipeline job, the plugin will always poll with the branch that was configured on the last job run.  

       

      Reproduction steps:

      • Create an empty git repo
      • Create a pipeline job file in the git repo on the master branch
      • Create a branch off of master in the git repo
      • Create a pipeline job in jenkins
      • Configure your pipeline job to poll (every minute is usually good to test with)
      • Configure your pipeline job to use the pipeline file you have checked in to master
      • Run your job
      • On your jenkins master vm navigate to the job folder E.G. /var/lib/jenkins/jobs/<jobname>  (if you are using the default ubuntu package for instance)
      • Validate that scm-polling.log is looking at your master branch
      • Update your pipeline job in Jenkins to point to your second branch
      • On your jenkins vm, validate that the timestamp on scm-polling.log has updated
      • Validate that the plugin is still polling against master

       

       

            vlatombe Vincent Latombe
            chocrates Chris McIntosh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: