Resolving Password Parameters

How can we resolve a password parameter within a plugin? I am storing a password as a configuration parameter and would like to resolve the password back in a custom notififer plugin.

I've attempted to use the SRunningBuild getParametersProvider and getValueResolver() methods but I seem to only get the %secure:teamcity.password.XXXXX% value.

srb is SRunningBuild

String passwordConfig = srb.getParametersProvider().get("PASSWORD");
ProcessingResult passwordResult = srb.getValueResolver().resolve(passwordConfig);
String password = passwordResult .getResult();


Comment actions Permalink


Unfortunately, we do not have public API to resolve password values. There is an internal API that you may call
The method: jetbrains.buildServer.serverSide.parameters.ParameterFactory#extractBuildParameters
converts collection of Parameter classes into Map<String, String> of name to value.

You may have an instance of jetbrains.buildServer.serverSide.parameters.ParameterFactory from Spring
autowiring, e.g. define it as a parameter of spring bean constructor.

Comment actions Permalink


I'm interested in this as well but it seems the API has changed over time. What may I use with TC API 9.x to achieve that? I haven't found anything useful so far...

Thanks a lot,


Please sign in to leave a comment.