Jenkins using timestamps

Background: The new configuration of the installation configuration of Jenkins, Jenkins is desirable to use the built-in variable BUILD_ID timestamp format as the file name.

However, echo $ {BUILD_TIMESTAMP} not recognize

 

Solution: need to install plug-Zentimestamp plugin following configuration is required after installation.

Modified job configuration, the following screenshot:

how to use?

For example, modify the file name

cp XXX.zip xxx-${BUILD_TIMESTAMP}.zip

Then the file will be named with a time stamp.

Guess you like

Origin www.cnblogs.com/peng-lan/p/12001615.html