How to get specific information about the current build project in Jenkins with Groovy?

后端 未结 6 1443
闹比i
闹比i 2021-02-13 10:50

In Jenkins/Hudson, with the help of a Postbuild Groovy script, I would like to get one of the following:

  • an environment variable (e.g. current JOB_NAME, BUILD_NUMB
6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-13 11:08

    an environment variable (e.g. current JOB_NAME, BUILD_NUMBER etc.)

    String jobName = System.getenv('JOB_NAME')
    

提交回复
热议问题