Jenkins Pipeline job can't find script due to @tmp path being created

后端 未结 6 1071
小蘑菇
小蘑菇 2021-02-07 07:19

I am writing a pipeline job that will call another script to execute. The Jenkinsfile and script exist in the same directory and yet the job fails to find the script to run.

6条回答
  •  暖寄归人
    2021-02-07 08:10

    Have you tried using the jenkins workspace environment variable WORKSPACE (absolute path of the workspace)? With that your line would look something like this:

    sh '${WORKSPACE}/jenkins/pipeline/update-jenkins-plugins-ppln/update-plugins.sh'
    

提交回复
热议问题