How to get build time stamp from Jenkins build variables?

前端 未结 10 984
余生分开走
余生分开走 2020-12-24 11:25

How can I get build time stamp of the latest build from Jenkins? I want to insert this value in the Email subject in post build actions.

10条回答
  •  既然无缘
    2020-12-24 12:17

    You can use the Jenkins object to fetch the start time directly

    Jenkins.getInstance().getItemByFullName().getBuildByNumber().getTime()
    

    also answered it here: https://stackoverflow.com/a/63074829/1968948

提交回复
热议问题