I have a jenkins job which is failing on build step.
stage('build') {
steps {
sh '${WORKSPACE}'
}
}
logs from jenkins server is as follows
[Pipeline] sh
+ /root/.jenkins/workspace/dvmt-image-capture-manager-new
/root/.jenkins/workspace/dvmt-image-capture-manager-new@tmp/durable-bb5f7b6c/script.sh: line 1: /root/.jenkins/workspace/dvmt-image-capture-manager-new: Is a directory
can someone please take a look and guide be what I could be doing wrong. I will really appreciate it.
Remove the sh “WORKSPACE” part because you are trying to execute on workspace and you are not doing anything.
sh '${WORKSPACE}' > sh "echo ${WORKSPACE}" if you after printing the workspace path else remove it
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.