Team City Templates and Artifacts

I recently noticed that I need to reuse the build step in many projects. So I created a template where I just defined this build step and had projects that needed it related to this template. It worked perfectly.

But then I realized that none of the affected projects generate their artifacts, although all of them were successfully built. When I looked at General Settings, the Artifact Routes field was grayed out and Team City told me that I can only change it inside the template!

I want my assemblies to have different artifact paths (some do not even generate artifacts at all), but I do not want to duplicate my build step. Is there any workaround for this?

Team City Version: 6.5.6 (Build 18130)

+7
source share
2 answers

Here is how I get around this problem:

  • Create a configuration parameter in the template assembly options section. I just call it Artifacts .

Artifact template parameter

  • Then specify the property in the Artifact Paths field in the template, for example % Artifacts%

Artifact paths image

  • Then, for each configuration that inherits the template, you can override the artifact configuration parameter accordingly.

Artifact override parameter

NTN

+14
source

This is an old question and, apparently, affects only users with TeamCity versions less than 8.1 (as indicated in the comments to the accepted answer).

According to the official documentation :

Starting with TeamCity 8.1, in the assembly configuration inherited from the template, you can now override the following parameters:

  • assembly number format
  • artifact paths
  • assembly parameters (detection of hanging assemblies, status widget, number of assemblies working simultaneously)
  • VCS Verification Mode
  • order catalog
  • clear all files before assembly
  • show changes from snapshot dependencies
  • lead time
  • all general assembly failure conditions, including runtime
+1
source

All Articles