I’m trying to execute a curl command in a script step. I’m basically trying to post a build status to our Bitbucket Server. As part of the data I send I want to pass the bitrise build URL and build number.
However it seems the environment variables are not substituted where I put them, instead the variable names are passed. Is there a way to get environment variable values injected in the script?
I also have a custom environment variable $PRCommit that I pass in when triggering the build, and replacing that in the script does work as I expect
Stripped down sample script:
curl -H "Content-Type: application/json" -X POST https://our.build.server/rest/build-status/1.0/commits/$PRCommit --data '{"state": "INPROGRESS", "key": "$BITRISE_BUILD_NUMBER", "url": "$BITRISE_BUILD_URL"}'