Defining artifactRules from multiple templates
I have a BuildType that is templated on two separate templates that specify its own `artifactRules`. Each template `artifactRules` looks something like:
artifactRules = """
+:path/to/artifactXYZ
""".trimIndent()
I would like both artifacts to be found in the TeamCity UI.
But when I inspect the configuration in the TeamCity UI/or run a build the configuration `artifactRules` only lists the first rule from the first template specified.
Please sign in to leave a comment.
Hello David,
Unfortunately, right now this is not possible - TeamCity will use only one of the templates to fill out the field in the build configuration. It sounds like nested templates feature could come useful in this case - please consider voting or commenting on it as you see fit.
Alternatively, you could use Kotlin DSL to generate configurations - this way, you could avoid using templates at all and simply construct configuration objects in your code, generating the artifact rules for them as necessary.
Thank you for the response. Sad that artifactRules are not templated like that.