4 comments

Hi Ryan,

 

I'm afraid this isn't currently possible. We are working on bringing the feature, but it's not quite ready yet.

0
Avatar
Permanently deleted user

Do you have an ETA?  I hope I do not require to upgrade my current version.

0
Avatar
Permanently deleted user

I am trying to execute a PowerShell file that will resolve team city variables.

What is the syntax to render team city variable in a PowerShell file. I am able to run this "inline" but that is not ideal to put across the several templates we use. I have tried without quotes around build counter and tried single/double quotes. Nothing seems to work.

$temp = "%build.counter%;"
write-host "build.counter -> ${temp} ";

0

Hi Ryan,

 

I'm sorry I didn't mention it the last time around, it seems it slipped my mind. There is a feature request for it in our issue tracker: https://youtrack.jetbrains.com/issue/TW-36360, please watch and vote for it.

 

I'm afraid that the use of parameters is not available from within script files at all. We cannot preprocess them right now to replace the values. With this in mind, there should be a relatively easy option: If you are interested in a small subset of parameters, create for your build a set of environment variable parameters (env.<name>) for each one that you want to access, then access those environment variables via powershell.

For example, if you want to use the build counter, you could create env.BUILD_COUNTER, which will create the "BUILD_COUNTER" environment variable, which should be possible to pick up from within powershell.

 

Would that work for you?

0

Please sign in to leave a comment.