Teamcity Dependencies Password Variable

Can't pass password to the child build in Teamcity.

In the Teamcity project, there is a build that works fine. A password is requested and system login is used.

LOGIN       %teamcity.build.triggeredBy.username%
PASSWORD    %secure:teamcity.password.PASSWORD%

I create another build and I specify the first build as the child. Teamcity runs a child build with default parameters.

  1. To send parameters to the child build, I create the following parameters in the parent:

    reverse.dev.Buil_ID.PARAMETER

With all the usual parameters, this works fine, but the password is not transmitted. If the type of the password field is changed to Text - the password starts to be transmitted, but appears in the logs and parameters in the clear.

  1. The variable PASSWORD as %secure:teamcity.password.PASSWORD% is moved to the project level. In the parent build, it is queried and works fine, the variable is not defined in the child build.

  2. Define the password as %teamcity.auth.password% In this case, the hash password is passed. How to return it to its original form from hash?

Maybe there are other solutions to the problem?

2 comments
Comment actions Permalink

probably may use a template for that configurations and store there login and password?

0
Comment actions Permalink

Hi,

 

just for reference, passing parameters with passwords is somewhat problematic: https://youtrack.jetbrains.com/issue/TW-55923

 

Extracting the password to the project level is usually the best option if both builds are in the same project, but can get more complex if they are in different projects. Please feel free to watch and vote for the issue.

0

Please sign in to leave a comment.