How to retrieve current workspace using Jenkins Pipeline Groovy script?

后端 未结 7 1189
独厮守ぢ
独厮守ぢ 2020-12-29 20:03

I am trying to get the current workspace of my Jenkins build using a Groovy pipeline script:

node(\'master\') {
    // PULL IN ENVIRONMENT VARIABLES
    // J         


        
7条回答
  •  长情又很酷
    2020-12-29 20:52

    I have successfully used as shown below in Jenkinsfile:

    steps {
      script {
        def reportPath = "${WORKSPACE}/target/report"
        ...
      }
    }
    

提交回复
热议问题