How to get build time stamp from Jenkins build variables?

前端 未结 10 985
余生分开走
余生分开走 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

    I know its late replying to this question, but I have recently found a better solution to this problem without installing any plugin. We can create a formatted version number and can then use the variable created to display the build date/time. Steps to create: Build Environment --> Create a formatted version number:

    • Environment Variable Name: BUILD_DATE

    • Version Number Format String: ${BUILD_DATE_FORMATTED}

    thats it. Just use the variable created above in the email subject line as ${ENV, var="BUILD_DATE"} and you will get the date/time of the current build.

提交回复
热议问题