Hello,
we’re running Jenkins 2.277.4 on RH7 using OpenJDK11 (and no container) + Git plugin 4.7.1
In “Global properties” of the Jenkins configuration, we’ve defined a shell variable:
GerritSlave
ssh://hy@gerrit-....com:29418/repo/path
Later on, in the job configuration we use this in
Source Code Management
Git
Repository URL
${GerritSlave}
Having the job triggered by polling.
Now we had to find, that we see jobs not starting and in “Git polling log” we find:
--------
Started on Jun 8, 2021, 5:26:00 PM
Polling SCM changes on master
Using strategy: Default
[poll] Last Built Revision: Revision 5cb005655e96b87a21df36a5c1dad1ebdb925854 (refs/remotes/origin/branches/maintenance/PSint)
The recommended git tool is: NONE
using credential 50da578b-178c-4cba-b103-91c74f6522ed
> git rev-parse --resolve-git-dir /var/fpwork/WS/PHY_TX--LF--PSint--buildTrigger/PHY_TX/.git # timeout=10
Fetching changes from the remote Git repositories
> git config remote.origin.url ${GerritSlave} # timeout=10
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
Resetting working tree
> git reset --hard # timeout=10
> git clean -fdx # timeout=10
Fetching upstream changes from ${GerritSlave}
> git --version # timeout=10
> git --version # 'git version 2.30.0'
> git config --get remote.${GerritSlave}.url # timeout=10
FATAL: hudson.plugins.git.GitException: Failed to fetch from ${GerritSlave}
hudson.plugins.git.GitException: Command "git config --get remote.${GerritSlave}.url" returned status code 1:
stdout:
stderr:
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2661)
-------
So it looks like the variable didn’t get expanded and then the polling fails.
If this happens, it seems the polling gets stuck in this situation.
If I now trigger the job once manually (“Build with parameters”), the GIT polling will work: The variable gets expanded as expected, the job gets triggered if needed.
But it seems eventually, it gets stuck in the same way again.
I’m not sure, but it seems the problem started with updating the Jenkins core (from 2.263.4 to 2.277.4) and the GIT plugin.
Any ideas how to debug – or even better solve – this problem ?
Anyone seeing similar issues, maybe since updating ?
Regards
Martin
If I now
trigger the job once manually (“Build with parameters”), the GIT polling will
start to work: The variable gets expanded as expected, the job gets triggered if needed.
No configuration change. So the configuration seems to be correct, but it seems something gets "confused". (See also below)