Parameters / Environment Variables with newlines
Hello,
We are using TeamCity 10.0.3, using it to build / run a Cucumber suite with Ruby code.
We are attempting to enter a multi-line parameter for a build, so that we can push in an environment variable for a public key certificate.
However, it does not seem that we can use multi-line parameters in TeamCity. We can specify the value with multiple lines, and TC does not complain. But during our build, when the value hits the Ruby code in the ENV collection, it is truncated to just the first line of the environment variable (e.g., "-----BEGIN CERTIFICATE-----" without the full certificate).
Is there some way we can prevent the truncation or otherwise successfully pass in a multi-line parameter to a build?
Thanks in advance!
-Sean
Please sign in to leave a comment.
Hi Sean,
I've just tried in 2017.1.1 and this value isn't being truncated when passed to a command line runner. To show the example, I had a variable with several lines, and the command line runner did echo "%parameter%", then the full content was echoed into the console. The same happened when used as a %env.parameter%. Could you try whether the command line would echo it properly into the build log output?
Which runner are you using? It's possible that it's the runner itself that is truncating the value.