Hello!
I'm new to jenkins, and I'm trying to get a simple
multibranch pipeline to work. All my Jenkinsfile in my git project does
is run a shell script, also in the git project. But all variations I
tried end with "java.io.IOException: Cannot run program "./myscript.sh":
error=2, No such file or directory".
This is on Jenkins 2.5. Here's a copy of my Jenkinsfile:
node {
println pwd()
sh 'ls -lt'
def command = "./myscript.sh"
def process = command.execute()
process.waitFor()
if (!process.exitValue()) {
build 'some_other_jenkins_job'
}
}
myscript.sh is in the same dir as Jenkinsfile.
pwd gives: <jenkins home>/workspace/myproject/master
sh 'ls -lt' gives me nothing (empty dir).
The script and Jenkinsfile can be found at <jenkins home>/workspace/myproject/master@script, but hardcoding that as the command path also gives me the same error.
This is a very simple case, so I'm at a loss. I'd would appreciate any insights!