I'm using Jenkins - 2.375.2 and both
Jenkinsfile and
script.sh files are in my github repository.
My Jenkinsfile (Declarative Pipeline) content as follows,
pipeline {
agent any
stages {
stage('Checkout') {
steps {
git url: 'g...@github.com:org/repository.git'
}
}
stage('Script') {
steps {
sh 'script.sh'
}
}
}
Any idea why my job goes to below path and looking for script?
+ myscript.sh
/home/user/jenkins/workspace/My_JOB_1@tmp/durable-942e10b9/script.sh: 1: /home/user/jenkins/workspace/My_JOB_1@tmp/durable-942e10b9/script.sh: myscript.sh: not found
I have my script inside this path /home/user/jenkins/workspace/My_JOB_1 path.
Not sure why it has created jobname with @tmp and looking script in that path.
Any advise to fix this problem would be helpful.