I have a master set up on Windows machine.
I have a few nodes on Jenkins, one of which has 2 labels: "system project".
This node is actually a plain Solaris 11.3 machine.
Other nodes are plain windows machines (including master).
I have a Jenkinsfile in my project in which I defined pipeline as:
pipeline {
agent { label 'system && project' }
environment {
PATH='$PATH:/home/user/path'
}
stage('Build') {
echo "Test PATH=$PATH"
}
...
When I build, I see the error in the log appears:
ERROR: Error cloning remote repo 'origin'
...
Caused by: java.io.IOException: Cannot run program "git.exe" (in directory "/remote/rootdir/workspace/ProjectName"): error=2, No such file or directory
The build is added as Jenkins Pipeline, not a freestyle project or something. And for now the only thing configured is GitLab repo with SSH credentials (rsa key).
But why does it try to call "git.exe" on Solaris? It clearly shows to me in the "Nodes" section (https://servername/computer/) that it is, in fact, a SunOS (amd64).
Can it actually be called on the wrong Node? But I see the "/remote/rootdir/workspace/ProjectName" directory created (it wasn't there before, I even removed it and relaunched build to make sure Jenkins actually creates it). Clearly, this isn't the case, as I originally suspected.
The machine itself has git installed - I checked by manually cloning the same repo using the same rsa key.
What am I doing wrong? What am I missing? How to tell Jenkins to use correct git?
Please, help.
git
both on solaris and windows?