Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

9
  • 11
    Nice tip, Here is the format with milliseconds and path friendly [DateTime]::Now.ToString("yyyyMMdd_hhmmssff")
    – iraSenthil
    Commented Mar 4, 2014 at 14:43
  • 13
    You must also define env.BUILD_START_TIME in the agent's buildAgent.properties file. Otherwise TeamCity won't match an agent as compatible.
    – seldary
    Commented Apr 20, 2014 at 7:55
  • @seldary, thanks for the tip here on the defining of the property in the build agent. How do I actually ensure that the powershell value is pushed to the build agent, if I define the env property this overwrites the build servers value? Commented Jun 6, 2014 at 8:45
  • 2
    @Alex Blokha Just give it a temp value like "test", and it'll overwrite it properly Commented Apr 26, 2017 at 17:51
  • 1
    setting buildNumber directly with Service Message feature: echo "##teamcity[buildNumber 'myBuildNumberHere']"
    – Ricky
    Commented Dec 28, 2017 at 2:33