Skip to main content
Jul 25, 2017 8:54 AM UTC

Errors when Jenkins slave issues Git commands on USS

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?

    24 replies

    Tatiana Balaburkina
    Rocketeer
    Jul 25, 2017 10:22 AM UTC

    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?

    Hi,
    Thanks for report. We have received your request and we will work on this problem.

    Jul 25, 2017 10:53 AM UTC

    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?

    Can you please do the following and provide the output?

    • Set the environment variable EDITOR to “env|sort; echo” – this will dump the environment at the time of the error and echo the argument to the editor.
    • Set GIT_TRACE=<an absolute path to a trace file, like “/u/username/git_trace.txt”> – this will log some additional information about the command.
    • Provide the contents of the gitenv.sh script.

    Thanks!

    Jul 25, 2017 2:29 PM UTC

    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?

    There are no additional statements added to the Jenkins slave log or the build log (not sure if any expected). The contents of the trace file:

    18:11:20.192077 ./git.c:351             trace: built-in: git 'config' '--global' 'core.editor' 'env|sort; echo'
    18:12:03.264553 ./git.c:351             trace: built-in: git 'config' '--global' 'core.editor' 'env|sort; echo'
    18:14:03.262706 ./git.c:351             trace: built-in: git 'config' '--global' 'core.editor' 'env|sort; echo'
    18:16:17.099597 ./git.c:351             trace: built-in: git 'rev-parse' '--is-inside-work-tree'
    18:16:17.364039 ./git.c:351             trace: built-in: git 'config' 'remote.origin.url' 'ssh://drbruce@ee-jenkins.rtp.raleigh.ibm.com/git/mortgage-repo.git'
    18:16:17.654265 ./git.c:351             trace: built-in: git 'version'
    18:16:19.148319 ./git.c:351             trace: built-in: git 'fetch' '--tags' '--progress' 'ssh://drbruce@abc.com/git/mortgage-repo.git' '+refs/heads/*:refs/remotes/origin/*'
    18:16:19.149436 ./run-command.c:369     trace: run_command: '/tmp/ssh5001375550365929388.sh' 'drbruce@abc.com' 'git-upload-pack '\\''/git/mortgage-repo.git'\\'''
    18:16:19.161524 ./run-command.c:131     trace: execvp: '/tmp/ssh5001375550365929388.sh' 'drbruce@abc.com' 'git-upload-pack '\\''/git/mortgage-repo.git'\\'''
    18:16:21.955577 ./git.c:351             trace: built-in: git 'version'
    18:16:22.035495 ./git.c:351             trace: built-in: git 'config' '--system' '--edit'
    

    There are no ssh*.sh files in /tmp. I assume they were cleaned up automatically by someone. The contents of gitenv.sh is:

    #!/bin/sh
    git $@ | iconv -f ibm-1047 -t ibm-1047
    

    We have found that this is necessary when using the Jenkins slave and the Bash version provided by Rocket on this test system. We do not know why. If we do not use the iconv command, the git fetch command fails with a return code status of 128 followed by a lot of garbage characters. Requiring the use of the ICONV command will be the subject of our next topic once this issue is resolved. :^)

    Jul 25, 2017 3:01 PM UTC

    There are no additional statements added to the Jenkins slave log or the build log (not sure if any expected). The contents of the trace file:

    18:11:20.192077 ./git.c:351             trace: built-in: git 'config' '--global' 'core.editor' 'env|sort; echo'
    18:12:03.264553 ./git.c:351             trace: built-in: git 'config' '--global' 'core.editor' 'env|sort; echo'
    18:14:03.262706 ./git.c:351             trace: built-in: git 'config' '--global' 'core.editor' 'env|sort; echo'
    18:16:17.099597 ./git.c:351             trace: built-in: git 'rev-parse' '--is-inside-work-tree'
    18:16:17.364039 ./git.c:351             trace: built-in: git 'config' 'remote.origin.url' 'ssh://drbruce@ee-jenkins.rtp.raleigh.ibm.com/git/mortgage-repo.git'
    18:16:17.654265 ./git.c:351             trace: built-in: git 'version'
    18:16:19.148319 ./git.c:351             trace: built-in: git 'fetch' '--tags' '--progress' 'ssh://drbruce@abc.com/git/mortgage-repo.git' '+refs/heads/*:refs/remotes/origin/*'
    18:16:19.149436 ./run-command.c:369     trace: run_command: '/tmp/ssh5001375550365929388.sh' 'drbruce@abc.com' 'git-upload-pack '\\''/git/mortgage-repo.git'\\'''
    18:16:19.161524 ./run-command.c:131     trace: execvp: '/tmp/ssh5001375550365929388.sh' 'drbruce@abc.com' 'git-upload-pack '\\''/git/mortgage-repo.git'\\'''
    18:16:21.955577 ./git.c:351             trace: built-in: git 'version'
    18:16:22.035495 ./git.c:351             trace: built-in: git 'config' '--system' '--edit'
    

    There are no ssh*.sh files in /tmp. I assume they were cleaned up automatically by someone. The contents of gitenv.sh is:

    #!/bin/sh
    git $@ | iconv -f ibm-1047 -t ibm-1047
    

    We have found that this is necessary when using the Jenkins slave and the Bash version provided by Rocket on this test system. We do not know why. If we do not use the iconv command, the git fetch command fails with a return code status of 128 followed by a lot of garbage characters. Requiring the use of the ICONV command will be the subject of our next topic once this issue is resolved. :^)

    Hmmm, well THAT didn’t do what I expected it to. Can you try again, but WITHOUT setting EDITOR? That seems to have backfired.

    I’m confused about the use of gitenv.sh What I expect to see there was a bunch of export commands setting up the environment for git. Instead, it’s doing something odd WRT character encoding.

    There are too many moving parts here that I can’t see to really understand what’s going on, but the z/OS git port relies on enhanced ASCII support for character conversion. Is something somewhere setting all the environment variables that are specified in the release notes? What does /u/dbruce/test/dbb/sample/git-jenkins.sh look like?

    Jul 25, 2017 3:33 PM UTC

    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?

    Sorry! My mistake. I mixed up the gitenv.sh file with the git-jenkins.sh file. /u/dbruce/test/dbb.sample.git-jenkins.sh file contains the pipe to iconv posted earlier. Then contents of gitenv.sh is:

    #!/bin/sh
    
    # git the environment variables
    export GIT_SHELL=/var/rocket/bin/bash
    export GIT_EXEC_PATH=/var/rocket/libexec/git-core
    export GIT_TEMPLATE_DIR=/var/rocket/share/git-core/templates
    export PREFIX=/u/dbruce/prefix
    #export EDITOR="env|sort; echo"
    export GIT_TRACE=/u/dbruce/git_trace.txt
    
    #common the environment variables
    export PATH=/var/rocket/bin:$PATH
    export MANPATH=$MANPATH:/var/rocket/man
    export PERL5LIB=$PERL5LIB:/var/rocket/lib/perl5
    export LIBPATH=$LIBPATH:/var/rocket/lib/per15/5.24.0/os390/CORE
    
    #ASCII support the environment variables
    export _BPXK_AUTOCVT=ON
    export _CEE_RUNOPTS="FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)"
    export _TAG_REDIR_ERR=txt
    export _TAG_REDIR_IN=txt
    export _TAG_REDIR_OUT=txt
    
    #set git editor to create comments on encdoing ISO8859-1
    #git config --global core.editor "/bin/vi -W filecodeset=ISO8859-1"
    

    Here is the updated contents of the trace file:

    DBRUCE:/u/dbruce>cat git_trace.txt
    19:26:15.077296 ./git.c:351             trace: built-in: git 'rev-parse' '--is-inside-work-tree'
    19:26:15.315788 ./git.c:351             trace: built-in: git 'config' 'remote.origin.url' 'ssh://drbruce@ee-jenkins.rtp.raleigh.ibm.com/git/mortgage-repo.git'
    19:26:15.610612 ./git.c:351             trace: built-in: git 'version'
    19:26:17.055400 ./git.c:351             trace: built-in: git 'fetch' '--tags' '--progress' 'ssh://drbruce@ee-jenkins.rtp.raleigh.ibm.com/git/mortgage-repo.git' '+refs/heads/*:refs/remotes/origin/*'
    19:26:17.056541 ./run-command.c:369     trace: run_command: '/tmp/ssh7857973656542272771.sh' 'drbruce@ee-jenkins.rtp.raleigh.ibm.com' 'git-upload-pack '\\''/git/mortgage-repo.git'\\'''
    19:26:17.136736 ./run-command.c:131     trace: execvp: '/tmp/ssh7857973656542272771.sh' 'drbruce@ee-jenkins.rtp.raleigh.ibm.com' 'git-upload-pack '\\''/git/mortgage-repo.git'\\'''
    19:26:20.032178 ./git.c:351             trace: built-in: git 'version'
    19:26:20.115092 ./git.c:351             trace: built-in: git 'config' '--system' '--edit'
    

    Additionally here is the Jenkins slave log file which does contain a lot of environment variables. (All the statements except the last warning statement are from the slave startup):

    [07/25/17 15:24:55] [SSH] Opening SSH connection to xyz.com:22.
    [07/25/17 15:24:55] [SSH] Authentication successful.
    [07/25/17 15:24:56] [SSH] The remote users environment is:
    @="sh"
    ERRNO="0"
    HOME="/u/dbruce"
    IFS=" 	
    "
    LINENO="0"
    LOGNAME="DBRUCE"
    MAIL="/usr/mail/DBRUCE"
    MAILCHECK="600"
    OPTIND="1"
    PATH="/bin"
    PPID="67108909"
    PS1="\\$ "
    PS2="> "
    PS3="#? "
    PS4="+ "
    PWD="/u/dbruce"
    RANDOM="25130"
    SECONDS="0"
    SHELL="/bin/sh"
    SSH_CLIENT="1.2.3.4 32820 22"
    SSH_CONNECTION="1.2.3.4 32820 5.6.7.8 22"
    USER="DBRUCE"
    [07/25/17 15:24:56] [SSH] Starting sftp client.
    [07/25/17 15:24:56] [SSH] Copying latest slave.jar...
    [07/25/17 15:24:58] [SSH] Copied 712,800 bytes.
    Expanded the channel window size to 4MB
    [07/25/17 15:24:58] [SSH] Starting slave process: . /u/dbruce/test/gitenv.sh && export JAVA_HOME=/usr/lpp/java/J7.0_64/ && export IBM_JAVA_ENABLE_ASCII_FILETAG=ON && env && cd "/u/dbruce/test/jenkins" && /usr/lpp/java/J7.0_64/bin/java -Dfile.encoding=ISO8859-1 -Xnoargsconversion -jar slave.jar
    MAIL=/usr/mail/DBRUCE
    PATH=/var/rocket/bin:/bin
    _TAG_REDIR_IN=txt
    GIT_EXEC_PATH=/var/rocket/libexec/git-core
    GIT_TRACE=/u/dbruce/git_trace.txt
    GIT_SHELL=/var/rocket/bin/bash
    SSH_CLIENT=1.2.3.4 32820 22
    _BPXK_AUTOCVT=ON
    SHELL=/bin/sh
    IBM_JAVA_ENABLE_ASCII_FILETAG=ON
    _CEE_RUNOPTS=FILETAG(AUTOCVT,AUTOTAG) POSIX(ON)
    _=/bin/env
    LOGNAME=DBRUCE
    LIBPATH=:/var/rocket/lib/per15/5.24.0/os390/CORE
    GIT_TEMPLATE_DIR=/var/rocket/share/git-core/templates
    _TAG_REDIR_OUT=txt
    USER=DBRUCE
    HOME=/u/dbruce
    PERL5LIB=:/var/rocket/lib/perl5
    PREFIX=/u/dbruce/prefix
    SSH_CONNECTION=1.2.3.4 32820 5.6.7.8 22
    JAVA_HOME=/usr/lpp/java/J7.0_64/
    _TAG_REDIR_ERR=txt
    MANPATH=:/var/rocket/man
    <===[JENKINS REMOTING CAPACITY]===>channel started
    Slave.jar version: 3.0
    This is a Unix agent
    Agent successfully connected and online
    Jul 25, 2017 7:26:20 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.
    '
    
    Tatiana Balaburkina
    Rocketeer
    Jul 26, 2017 7:42 AM UTC

    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?

    Hi,
    Which versions of z/OS are installed on these systems?

    Jul 26, 2017 8:40 AM UTC

    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?

    Both systems are running z/OS 2.02

    Tatiana Balaburkina
    Rocketeer
    Jul 27, 2017 9:09 AM UTC

    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?

    Did you try to run Git fetch directly on the system with wrong behaviour (I mean without Jenkins slave). If not, could you try?

    Jul 31, 2017 12:53 PM UTC

    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?

    Yes, the commands original post above all work successfully when issued directly via the command line.

    Aug 1, 2017 9:44 AM UTC

    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?

    I’m a bit confused as to what Jenkins is trying to do here. The trace file indicates that something is trying to run git config --system --edit, which should start an interactive editor on the config file, which doesn’t seem right.

    Anyway, I have a few suggestions that may shed a little light:

    • Please set these variables in gitenv.sh:

      • GIT_TRACE_SETUP=true
      • GIT_FLUSH=1
    • Are the login shells the same on the two systems? You can check this from USS by running:

      /bin/tsocmd listuser dbruce omvs | grep PROGRAM