Parameter Management

My task is to clean up the parameters in a certain TeamCity(2017.1.5) project and it's sub-projects/configurations. I do not know how you can tell if a parameter is being used or not. It would also be nice to see a diagram or something showing what parameters are on what projects/configurations. Is there some kind of plugin I could use or REST API calls or...?

Thanks

Seth

0
2 comments

Hi Seth,

 

This task is not particularly easy, as there can be parameters roughly everywhere. I'm afraid I'm unaware of a direct way to find parameter usages, but there might be some indirect ways:

-You can gather a list of all the parameters in use.

-You can scan the project files (in XML under <data_directory>/config/projects/...) for usages. Finding a parameter in a line of text that doesn't define the parameter should mean a usage of the parameter.

-Alternatively, you can, in the UI, "Delete" parameters. If they are in use, they will reappear in red and say "<value is required>".

An easier option would be to have the configuration stored as Kotlin DSL instead of XML files, where refactoring and extracting as variables would probably be much easier to do.

 

 

I've created the issue https://youtrack.jetbrains.com/issue/TW-56866 to improve the usability on this regard. Please watch and vote for it.

0
Avatar
Permanently deleted user

Thanks for the ideas Denis. I believe there is already an issue like this but it doesn't seem to be going anywhere: https://youtrack.jetbrains.com/issue/TW-31570

0

Please sign in to leave a comment.