Sh failure in pipeline (JDK 8)

Hi,

I am using an older version of Jenkins due to my requirement to have an agent on a machine which only supports JDK 8.

The Jenkins version is 2.346.3.

I am pulling my hair out a little…I have a pipeline script (which works on a different Jenkins deployment), which has some sh commands. They appear to be failing, but I am not sure how to figure out why they are failing, or what is different about my setup in this Jenkins versus the one where this exact script (I copied it) is working. The console outlook does not offer me much help. Here is the console output:

Started by user Meg Watson
[Pipeline] Start of Pipeline
[Pipeline] node
Running on xxxxxx-TRETST in /home/sa/tretst/rjnk/workspace/DBHMasterGit
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Prepare Workspace)
[Pipeline] echo
Hello
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Git-Clone)
[Pipeline] echo
Git Clone stage
[Pipeline] sh
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Build)
Stage "Build" skipped due to earlier failure(s)
[Pipeline] }

Here is the pipeline script:

    stages {
        stage('Prepare Workspace') {
            steps {
                echo 'Hello'
            }
        }
        stage('Git-Clone') {
            steps {
                echo "Git Clone stage"
                sh '''env | sort
                git clone ssh://git@xxxxx.yyyyy.zzzzz/tre/tre.git
                git clone ssh://git@xxxxx.yyyyy.zzzzz/tre/trux.git
                git clone ssh://git@xxxxx.yyyyy.zzzzz/tre/TREUnitTests.git
                '''
            }
        }
:

I located the temporary directory Jenkins was using on the remote machine. Found the script there, was able to execute it successfully from the command line.

A couple of questions:

  1. Can you spot anything obviously wrong?

  2. Is there a way I can get more detailed debug/error output from the agent?

As always, your help is appreciated!
Meg

Found a lot of info about the agent in the “System Information” display in Jenkins. Added a prefix to the Start Agent Command (which I had added on the other agent, the one that works), and now it is working.