How to get the jobname from jenkins

前端 未结 3 1974
余生分开走
余生分开走 2021-02-03 17:35

Is there a way to get the jobname for the current build in jenkins and pass it as a parameter to an ant build script?

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-03 17:46

    A similar issue, I was looking for job name for shell script.

    In the 'Execute shell' > 'Command' textbox, both the below worked for me:

    echo $JOB_NAME  
    echo "$JOB_NAME"
    

提交回复
热议问题