Variable-named shared resource in template?
I have a few templates that need to make use of shared resources - where some the instantiations of the templates need to lock on the same resource as each other and others need to lock on a different resource. Is it possible to set up a shared resource lock so that they lock on a shared resource with a variable (which will be set as a build parameter)?
For example, I have 4 templates. They all connect to a database - and I want to lock shared access to the database between those four builds. However, I can use the same 4 templates on a different project that connect to a different database...the current solution (since when I set a build to be dependent upon a lock as a build feature) is to go in to all 8 instantiations, and set up the first 4 with one shared resource (db1), and the second 4 with another shared resource (db2). I'd like to be able to lock based off of a variable called "databaseName" (since I'm already defining that in the instantiations of the templates).
Is such a thing possible? It doesn't appear to be, because selecting the resource to lock on is a dropdown - and I can't find a way to specify a variable name.
Please sign in to leave a comment.
Hi Nathan,
It is not possible in TeamCity now. I've created the feature request https://youtrack.jetbrains.com/issue/TW-39174, please watch/vote for it.
I may be wrong, but i think it may be already possible with kotlin-based configurations.