Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create changelog artifact in TeamCity

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 other process create the change log but as TeamCity generates one for every build, I'm wondering if there is already a simple way to access it as an artifact and include it in the artifact paths directives so that it can be part of a release package.

like image 434
grenade Avatar asked Nov 30 '10 19:11

grenade


1 Answers

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").
like image 91
peter_raven Avatar answered Oct 06 '22 01:10

peter_raven