TeamCity Current Date variable in MMdd format

前端 未结 8 1412
谎友^
谎友^ 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:40

    The Groovy Plugin for TeamCity provides build start date/time properties:

    Provides build properties:

    system.build.start.date / env.BUILD_START_DATE

    system.build.start.time / env.BUILD_START_TIME

    This blog post has installation / configuration instructions for the Groovy plugin, as well an example of customizing the date/time format.

提交回复
热议问题