Tag Trigger Variable in SSH Task

Bongani Buthelezi September 26, 2024

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

1 answer

0 votes
Steffen Opel _Utoolity_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 27, 2024

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?.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events