How to retrieve current workspace using Jenkins Pipeline Groovy script?

后端 未结 7 1180
独厮守ぢ
独厮守ぢ 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:39

    This is where you can find the answer in the job-dsl-plugin code.

    Basically you can do something like this:

    readFileFromWorkspace('src/main/groovy/com/groovy/jenkins/scripts/enable_safehtml.groovy')
    

提交回复
热议问题