on smart values documentation page Jira smart values - development | Cloud automation Cloud | Atlassian Support :
{{build.refs}} returns the refs of the build, e.g. [feature/ISSUE-123-some-work, feature/ISSUE-456-more-work]. This is a list of metadata that can be associated with a build. It may contain, for example, branches and tags names.
This value is optional and may be an empty list.
how do i retrieve the tags names / repository tags of the build from {{build.refs}} ?
We are using tags as a trigger for deployments of a mono repo. For examples,
tag1: app1_1.1.2_dev
tag2: app2_1.1.2_dev
so tagging a commit in bitbucket with the tag app1_1.1.2_dev will trigger a deployment of app1 to dev environment.
Now, what we want to do is to setup an automation to automatically transit a ticket if
1. the ticket is for app1
2. the deployment build is tagged with app1_xxxxxx
how do i retrieve the tags names / repository tags of the build from the deployment's {{build.refs}} ?
Hi @kenan xin -- Welcome to the Atlassian Community!
I have not tried that with this smart value, so please experiment to learn if this helps:
The {{build}} smart value is only available with the built-related triggers: Build Successful, Build Failed, or Build Status Changed. And so the rule will need to use one of those.
Next, I recommend writing {{build.refs}} to the audit log when your rule triggers. That will show what is in the attribute, and then guide you on what can be parsed out, with list or text functions.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.