-
Bug
-
Resolution: Fixed
-
Trivial
-
None
We had a problem where a job would not pick up changes from git. It turned out that:
hudson.plugins.git.GitAPI#revParse(String revName)
just takes the first line of output from the rev-parse command into account.
Our problem was that someone had created a tag with the same name as the master branch. So we had 'origin/master' as the name of a tag and as the remote branch. This causes rev-parse to output:
$ git rev-parse origin/master
warning: refname 'origin/master' is ambiguous.
1a7b6f67b971f01f78c685f3d0917ea623fb5122
which stopped the plugin from figuring out what new revision should be. The problem was that this piece of information was not output in the build logs so was a bit tricky to track down.
I'm guessing that a simple check for this output and an appropriate exception could be added to GitAPI to aid in tracking this kind of problem down.
[JENKINS-11177] rev-parse can display a warning message and break current build revision
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
Workflow | Original: JNJira [ 141396 ] | New: JNJira + In-Review [ 205360 ] |
Wrote an automated test to verify that git client plugin 1.0.5 does not have this problem. A pull request for the automated test has been submitted to the git-client-plugin repository.