I recently noticed I needed to reuse a build step in many projects. So I created a template where I only defined that build step, and had the projects that needed it associated with that template. That worked perfectly.
But then I realized that none of the affected projects were generating their artifacts, even though all of them were building successfully. When I went to look at the General Settings, the Artifact Paths box was grayed out and Team City told me that I could only change it inside the template!
I want my builds to have different artifact paths (some don't even generate artifacts at all), but I don't want to duplicate my build step. Is there some workaround for this?
Team City Version: 6.5.6 (build 18130)
Edit page. Last modified: 28 September 2022. Build artifacts are files produced by a build. Typically, these include distribution packages, WAR files, reports, log files, and so on.
You can create new build configurations based on a template. You can associate/attach any number of existing build configurations with/to a template: there is the Attach to template option available from the Actions button in the upper right corner of the screen.
Artifact Paths Build artifacts are files produced by the build which are stored on TeamCity server and can be downloaded from the TeamCity UI or used as artifact dependencies by other builds.
This is how I workaround the issue:
HTH
This is an old question and apparently only affects users with TeamCity versions less than 8.1 (as pointed out in the comments to the accepted answer).
According to the offical documentation:
Since TeamCity 8.1, the following settings can now be overridden in a build configuration inherited from a template:
- build number format
- artifact paths
- build options (hanging builds detection, status widget, number of simultaneously running builds)
- VCS checkout mode
- checkout directory
- clean all files before build
- show changes from snapshot dependencies
- execution timeout
- all common build failure conditions, including execution timeout
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With