How to customize Jenkins build name?

前端 未结 6 849
生来不讨喜
生来不讨喜 2021-02-05 01:13

When I run a job in Jenkins, each build is given a name that shows in the UI in Build History that\'s basically the current date and time.

I\'d like to be able to put in

6条回答
  •  日久生厌
    2021-02-05 01:51

    Caveat: this only works in *nix environments. For individual shell steps you can execute instead as:

    /usr/bin/env JOB_NAME="Old JOB_NAME: ${JOB_NAME}" 
    

    Assuming your project is called "myproject", would see the JOB_NAME environment variable as "Old JOB_NAME: myproject"

提交回复
热议问题