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

Push notifications don't work if JOB_NAME variable is in repository URL

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • None

      Having configured a project with a Git SCM whose repository URL includes ${JOB_NAME}, push notifications to that project do not trigger polling. Everything works fine if the variable is replaced with a hard-coded name.

          [JENKINS-21886] Push notifications don't work if JOB_NAME variable is in repository URL

          Mark Waite added a comment -

          I'm able to duplicate this bug. The remote polling works, and when the next polling happens, the changes are detected. The push notifications seem to be the only thing that is ignored.

          Steps I took to duplicate the problem:

          1. Create a freestyle project named "bin"
          2. Configure git as its SCM, with git://wheezy64b/git/mwaite/${JOB_NAME}.git as the git repository URL
          3. Configure the job to poll SCM every minute (for testing purposes)
          4. Add a build step to execute "git log -n 1"
          5. Save the job
          6. Wait 1 minute for first poll to build the job
          7. After first build is complete, switch polling from every minute to @monthly
          8. Push a change to the repository
          9. Run "curl http://centos7x64:8080/git/notifyCommit?url=git://wheezy64b/git/mwaite/bin.git"
          10. Confirm that the job does not start
          11. Change the job polling frequency to once a minute
          12. Wait 1 minute, confirm the job detects the change and runs correctly

          Mark Waite added a comment - I'm able to duplicate this bug. The remote polling works, and when the next polling happens, the changes are detected. The push notifications seem to be the only thing that is ignored. Steps I took to duplicate the problem: Create a freestyle project named "bin" Configure git as its SCM, with git://wheezy64b/git/mwaite/${JOB_NAME}.git as the git repository URL Configure the job to poll SCM every minute (for testing purposes) Add a build step to execute "git log -n 1" Save the job Wait 1 minute for first poll to build the job After first build is complete, switch polling from every minute to @monthly Push a change to the repository Run "curl http://centos7x64:8080/git/notifyCommit?url=git://wheezy64b/git/mwaite/bin.git " Confirm that the job does not start Change the job polling frequency to once a minute Wait 1 minute, confirm the job detects the change and runs correctly

          Rouke de Jong added a comment -

          Still applicable, push/merge etc notifications are not working. Changing the repository url to a hard-coded entry works immediately but swapping it back to contain ${JOB_NAME} (which makes templating jobs way easier) fails silently.

          Rouke de Jong added a comment - Still applicable, push/merge etc notifications are not working. Changing the repository url to a hard-coded entry works immediately but swapping it back to contain ${JOB_NAME} (which makes templating jobs way easier) fails silently.

            Unassigned Unassigned
            siggimoo Milo Hyson
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: