We are currently experimenting with using Jenkins remote slave on USS to issue Git commands to Git installation. We have two test systems. On one of the test systems everything works as expected. On the second test system the Jenkins build fails during the Git fetch because it cannot find any remote branches. Both test systems are being invoked by the same Jenkins server and are connecting to the same remove Git server. We have not been able to identify what if any differences between the systems may be causing the inconsistent behavior.
We are using a standard Jenkins Git Client plugin to access the remote repository. It issues four commands at the beginning of each build. Jenkins Build Log from the failing test system:
Building remotely on tvt6031Dan in workspace /u/dbruce/test/jenkins/workspace/DansGitPull > /u/dbruce/test/dbb/sample/git-jenkins.sh rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository > /u/dbruce/test/dbb/sample/git-jenkins.sh config remote.origin.url ssh://drbruce@abc.com/git/mortgage-repo.git # timeout=10 Fetching upstream changes from ssh://drbruce@abc.com/git/mortgage-repo.git > /u/dbruce/test/dbb/sample/git-jenkins.sh --version # timeout=10 using GIT_SSH to set credentials Dans ee-jenkins git credentials > /u/dbruce/test/dbb/sample/git-jenkins.sh fetch --tags ssh://drbruce@abc.com/git/mortgage-repo.git +refs/heads/*:refs/remotes/origin/* Seen 0 remote branches ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
These commands work successfully when issued directly via the command line. After the build, the following error message appears in the Jenkins Slave log:
Jul 24, 2017 6:49:35 PM org.eclipse.jgit.util.FS discoverGitSystemConfig WARNING: Exception caught during execution of command '[git, config, --system, --edit]' in '/var/rocket/bin', return code '128', error message '�atal: Could not switch to '/rsusr/rocket/etc/': EDC5129I No such file or directory. '
We installed Git in /var/rocket and we invoke a gitenv.sh script at the beginning of the build so that everything is pointing to /var/rocket/* installation. We do not understand where the reference to /rsusr/rocket/etc is coming from. Is there anyway to redirect that reference to our installation directories in case it is trying to write some error or diagnostic messages?
