Thoughtworks Go provides a stack of job specific Environmental Variables passed to each task. For example my job outputs the same values that the API doc specifies.
[go] setting environment variable 'GO_ENVIRONMENT_NAME' to value 'rmp'
[go] setting environment variable 'a' to value 'b'
[go] setting environment variable 'GO_SERVER_URL' to value 'https://10.8.249.57:8154/go/'
I have not been able to resolve vars in a bash task command.
[go] Start to execute task: <exec command="echo" >
<arg>${GO_SERVER_URL}</arg>
Just outputs
${GO_SERVER_URL}
I have tried...
${GO_SERVER_URL}
${env.GO_SERVER_URL}
${go.GO_SERVER_URL}
$[GO_SERVER_URL]
$GO_SERVER_URL
"${GO_SERVER_URL}"
nothing works...
For a command with multiple options Go is rather finicky. tedder42's answer was correct for the simple echo case but didn't work for me on my real problem using curl with multiple parameters. Srinivas Upadhya on the Go Google group helped me out. I want to document it here for others so it is easy to find. It looks obvious, but small deviations didn't work.
Enter your command exactly like this:
The XML should look like this: