Create changelog artifact in TeamCity

前端 未结 4 1585
半阙折子戏
半阙折子戏 2021-02-01 07:40

Is there a simple way to have TeamCity include a text or html change-log as one of its output artifacts?

Perhaps I need to go down the route of having msbuild or some ot

4条回答
  •  迷失自我
    2021-02-01 08:15

    Yes, the change-log is accessible as a file, path to this file is in the TeamCity build parameter:

    %system.teamcity.build.changedFiles.file%
    

    So you could do this:

    • Add a command-line build step to your build.
    • Use type Custom Script.
    • Enter this script:
    copy "%system.teamcity.build.changedFiles.file%" changelog.txt
    
    • Finally edit the artifact rules for your build to include the changelog.txt in your artifacts (General settings -> Artifact paths -> Add "changelog.txt").

提交回复
热议问题