How to access environment variables from my bash script?


Sorry if I miss any thread which discussed the topic before. I want to initiate a build run via HTTP request, with "&" as parameters. I could see on my build's "Build parameters" page, env.test is set to 123 successfully.

How could I access the env var in my command line build runner? More specific, I am running a bash script as build runner, which need to access the env.test.

Please let me know how to do it.



Comment actions Permalink

Environment variables are set to the process and can be accessed as usual env variables, but you should omit env. prefix to access them. "env." prefix is required for TeamCity only to distinguish properties from environment variables.

Comment actions Permalink

Thanks, it works now


Please sign in to leave a comment.