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!

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/8bab4938-1dc3-497c-87e6-07be63957f74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to