Accessing Jenkins global property in Groovy

后端 未结 4 1465
死守一世寂寞
死守一世寂寞 2021-02-10 18:20

At this moment I defined a environment variable called GLOBAL_VAR with the value \'test\' under Manage Jenkins -> Configure System -> Global Properties. I have a shell script wh

4条回答
  •  滥情空心
    2021-02-10 19:13

    in "Execute Groovy script" you can access global (and build) variables by:

    def env = System.getenv()
    println(env['GLOBAL_VAR'])
    

提交回复
热议问题