TeamCity Current Date variable in MMdd format

前端 未结 8 1401
谎友^
谎友^ 2021-01-31 04:16

In TeamCity is there an easy way to get a variable for the current date in the format MMdd (eg 0811 for 8-Aug)?

My google-fu did not turn up an existing plugins. I look

8条回答
  •  南方客
    南方客 (楼主)
    2021-01-31 04:46

    An old question, but for those looking for a solution now there is a system parameter available.

    system.buildStartTime
    

    You need to declare it in config (it's not available until runtime) in order to run. I set mine to value [Filled Automatically]

    As you can guess, this time is set to the build start time, so that may not be ideal for some needs. But it's easy and reliable.

提交回复
热议问题