Change By: Leandro Lucarella (13/Oct/14 4:09 PM)
Description: 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 g...@github.com:sociomantic/git-hub.git # timeout=10
Fetching upstream changes from g...@github.com:sociomantic/git-hub.git
 > git --version # timeout=10
using GIT_SSH to set credentials GitHub jenkins-admin
 > git fetch --tags --progress g...@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:
---
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to