-
Bug
-
Resolution: Unresolved
-
Major
-
CentOS 5, JDK 1.7
Problem:
A job keeps triggering when it should not.
Background:
2 separate jobs are configured to be triggered on the same Github repository depending on branch that pushed to.
When pushing to the 1st branch, "origin/test/branch1", the 1st job is triggered. Good.
When pushing to the 2nd branch, "origin/test/branch2", the 2nd job triggers. Good.
But the 1st job is triggered again. Bad. There's only been 2 pushes.
The repository is very large, so the git clone takes a few minutes for both jobs.
The problem consistently occurs when pushing to the 1st branch, THEN immediately pushing to the 2nd branch. The 1st job is triggered and git cloning. And the 2nd job is triggered and queued. BUT another 1st job is triggered and queued.
Seems to happen when it's still downloading during the clone.
That extra triggered job is causing us grief, because it's used for deployments.
This is reproducible consistently with this script:
----------------------------
#!/bin/bash
pushd mydirectory
git checkout develop
echo ${1}d >> d.txt
git add .
git commit -m "${1}d"
git push
git checkout test/branch1
git pull --no-edit upstream develop
git push
git checkout test/branch2
git pull --no-edit upstream test/branch1
git push
popd
----------------------------
And run it as:
- ./script 1
- ./script 2
etc...
Jenkins v1.558
Git Client v1.9.1
Git plugin v2.2.1
GitHub API v1.54
Github OAuth v0.14
GitHub Pull Request Builder 1.12
GitHub plugin v1.8
I attempted to duplicate the bug and was unsuccessful. I'll need more information before further investigation is performed.
After that, I tried further by defining a hook in the git repo which caused the Jenkins jobs to poll each time there was a commit to the repo. The jobs when polled as a result of the hook also behaved as expected. The job monitoring test/branch1 ran each time there was a commit to test/branch1. The job monitoring test/branch2 did not run when there was a commit to test/branch1.
Can you provide more details of your configuration (job definitions, etc.) and confirm that the same problem can be duplicated on another Jenkins server?
Can you update your git client plugin from 1.9.0 to the currently released 1.9.1, in case there is some relevant difference between the version you're using and the version I'm using?