how to pass Environment variables in a curl command
Answered
I have a curl command that triggers a build in TeamCity:
curl -X POST -u <user>:<pass> -d ‘<build><buildType id=“<buildId>”/></build>’ http://<url>/httpAuth/app/rest/buildQueue --header “Content-Type: application/xml” -H “Accept: application/json” || true
How do I pass an environment variable In this CURL call? e.g env.buildId, env.suite, etc....
Please sign in to leave a comment.
Hello!
A modified example of -d payload could look like this:
You can check this article for more examples of REST API usage: https://www.jetbrains.com/help/teamcity/rest-api-reference.html#Triggering+a+Build
Please let me know if this helps.