Good Day,
I have a build plan that's being triggered on "Tags" now I would like to use the "Tag" that has triggered the build in one of my SSH tasks.
I have tried using the echo ${bamboo.TagBuildTriggerReason.tagName} variable in the script but this doesn't return any results. The Bamboo version we're is 9.6.2.
Respectfully,
Bongani
Not 100% sure about the SSH task, but given the syntax for referencing variables differs in a script task, you'll probably need to drop the curly braces and replace the dots with underscores, as follows:
echo $bamboo_TagBuildTriggerReason_tagName
Unfortunately that's still not documented in either Bamboo variables or Script, but you can see it used e.g. in section Environment variables within Using the AWS Credentials Variables task in Bamboo, and also in the answer to How to use Bamboo plan variables in an inline script task?.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.