We have a requirements capability variable
requirements capability variable
var = org1|org2|org3
when used this variable in bamboo yaml specs, it gets treated as string text and not as it gets processed from UI config.Please help how this can be handled.
Hello @ananda3
Bamboo YAML Specs will match a Regex under Requirements.
For example, I want my plan to accept my_requirement as either org1, org2 or org3:
---version: 2plan: project-key: ABC key: GHI name: GHIstages:- Default Stage: manual: false final: false jobs: - Default JobDefault Job: key: JOB1 tasks: - checkout: force-clean-build: 'false' description: Checkout Default Repository artifact-subscriptions: [] requirements: - my_requirement: ^(org1|org2|org3)$...
Please check your YAML code for a valid regular expression.
Thank you,
Eduardo AlvarengaAtlassian Support APAC
--please don't forget to Accept the answer if the reply is helpful--
@Eduardo Alvarenga this way I agree that my_requirement will be accepted as it is hardcoded in specs. However, my use case is that I want it to be configured from outside of the bamboo specs and dynamically bind with in the specs via project variable.
As mentioned, we have Requirements required capability defined with as a variable (e.g. my_requirement). Now, the condition that is put in place in UI config is"my_requirement matches org1|org2|org3"I want to map my requirement in bamboo specs as following:
project_org_variable = org1|org2|org3
requirements: - my_requirement: ${bamboo_project_org_variable}
But, this doesn't work. Our use case is that if org1 is down then we can just update the project variable to org2|org3 and there is no need to update bamboo specs for this.If I follow above approach, it comes as below in the spec filerequirements:- my_requirement: 'org1|org2|org3'I need a way to get rid of these quotes.
Adding variables to the Agent can Capabilities requirement fields is currently not supported in Bamboo.
We have a feature request you can vote on and follow to be notified of any changes in the future.
Make sure you add a comment with your specific business case so the developers can consider it to expedite the feature implementation.
Cheers,
It looks like you're new here. Sign in or register to get started.