• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • github-plugin
    • Jenkins ver. 1.565.3, GitHub plugin 1.9.1, CloudBees Folders Plugin 4.6.1

      After I started using the CloudBees Folders Plugin and moving jobs into folders, I noticed when I pushed stuff to github, builds were no longer triggered. I checked in GitHub and the Jenkins plugin was not enabled. I go to the job, save it again (the option "Build when a change is pushed to GitHub" is always checked and is the only method to trigger a build that's activated) and I see the hook is created, but after a minute or 2, it gets removed again. GitHub security log says the removal request comes from the Jenkins server.

      Looking at the source code, I see where hooks are being removed:
      https://github.com/jenkinsci/github-plugin/blob/49bc59d79707808d73eb0f9d5c97996fd5525d08/src/main/java/com/cloudbees/jenkins/Cleaner.java

      Activating the log for com.cloudbees.jenkins.Cleaner I can definitely see it's Jenkins the one removing the hooks. Why is considering jobs inside subfolders as "not interesting" I have no idea.

          [JENKINS-25127] Hook uninstalled if job is in a subfolder

          Leandro Lucarella created issue -
          Leandro Lucarella made changes -
          Description Original: After I started using the CloudBees Folders Plugin and moving jobs into folders, I noticed when I pushed stuff to github, builds were no longer triggered. I checked in GitHub and the Jenkins plugin was not enabled. I go to the job, save it again (the option "Build when a change is pushed to GitHub" is always checked and is the only method to trigger a build that's activated) and I see the hook is created, but after a minute or 2, it gets removed again. GitHub security log says the removal request comes from the Jenkins server.

          Looking at the source code, I see where hooks are being removed:
          https://github.com/jenkinsci/github-plugin/blob/49bc59d79707808d73eb0f9d5c97996fd5525d08/src/main/java/com/cloudbees/jenkins/Cleaner.java

          Activating the log for com.cloudbees.jenkins.Cleaner I can definitely see it's Jenkins the one removing the hooks. Why is considering jobs inside subfolders as "not interesting" I have no idea.

          Looking at the "GitHub Hook Log" for a top-level project, I see something like this:
          ---
          Last GitHub Push

          Started on Oct 13, 2014 3:21:08 PM
          Polling SCM changes on master
          Using strategy: Default
          [poll] Last Built Revision: Revision ae6386642259cb1b675730fbce96deaa29d3a369 (origin/master)
           > git rev-parse --is-inside-work-tree # timeout=10
          Fetching changes from the remote Git repositories
           > git config remote.origin.url git@github.com:sociomantic/git-hub.git # timeout=10
          Fetching upstream changes from git@github.com:sociomantic/git-hub.git
           > git --version # timeout=10
          using GIT_SSH to set credentials GitHub jenkins-admin
           > git fetch --tags --progress git@github.com:sociomantic/git-hub.git +refs/heads/*:refs/remotes/origin/*
          Polling for changes in
          Seen branch in repository origin/master
           > git log --full-history --no-abbrev --format=raw -M -m --raw ae6386642259cb1b675730fbce96deaa29d3a369..7618cac3f33deb84868332acc64572b60d7adf7e # timeout=10
          Done. Took 3.4 sec
          Changes found
          ---

          (I don't know why is it polling anything in the first place because Polling is not enabled)

          For a job in a subfolder, I see this log instead:
          ---
          New: After I started using the CloudBees Folders Plugin and moving jobs into folders, I noticed when I pushed stuff to github, builds were no longer triggered. I checked in GitHub and the Jenkins plugin was not enabled. I go to the job, save it again (the option "Build when a change is pushed to GitHub" is always checked and is the only method to trigger a build that's activated) and I see the hook is created, but after a minute or 2, it gets removed again. GitHub security log says the removal request comes from the Jenkins server.

          Looking at the source code, I see where hooks are being removed:
          https://github.com/jenkinsci/github-plugin/blob/49bc59d79707808d73eb0f9d5c97996fd5525d08/src/main/java/com/cloudbees/jenkins/Cleaner.java

          Activating the log for com.cloudbees.jenkins.Cleaner I can definitely see it's Jenkins the one removing the hooks. Why is considering jobs inside subfolders as "not interesting" I have no idea.
          Daniel Beck made changes -
          Labels New: folders
          Kanstantsin Shautsou made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 159033 ] New: JNJira + In-Review [ 195973 ]

            Unassigned Unassigned
            lucasocio Leandro Lucarella
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: