Here's my Jenkins 2.x pipeline:
node ('master'){
    stage 'Checkout'
    checkout scm
    stage "Build Pex"
    sh('build.sh')
}
When I run this pipeline the checkout puts the code into to the workspace as expected, however instead of expecting to find the script in workspace/ (it's really there!), it looks in an unrelated directory: workspace@tmp/durable-d812f509.
Entering stage Build Pex
Proceeding
[Pipeline] sh
[workspace] Running shell script
+ build.sh
/home/conmonsysdev/deployments/jenkins_ci_2016_interns/jenkins_home/jobs/pex/branches/master/workspace@tmp/durable-d812f509/script.sh: line 2: build.sh: command not found
How do I modify this Jenkinsfile so that build.sh is executed in the exact same directory as where I checked out the project source code?
 
     
     
     
     
     
     
     
     
     
    
