Hello Everyone,
Is it possible right now to call the yaml anchor based on the user Input given.
For example: Lets say we have to give input as 'A' i should call Build, if i give input as 'B' , we should cal\run Build, dockerimage.
This i tried by giving user-input but i am not able to run the yaml anchors.
let me know your thoughts.
Thanks
Hi @BHARATHKUREK,
At the moment it is possible to give user input in custom pipelines only, you can check our documentation here (search for the 'variables' keyword).
I'm afraid that it is not possible to do that with yaml anchors and non-custom pipelines yet.
I found the following feature request in our issue tracker:
I believe that this is what you are looking for? If so, I would suggest that add your vote in the feature request (by selecting the Vote for this issue link) as the number of votes helps the development team and product managers better understand the demand for new features. You are more than welcome to leave any feedback, and you can also add yourself as a watcher (by selecting the Start watching this issue link) if you'd like to get notified via email on updates.
Implementation of new features is done as per our policy here and any updates will be posted in the feature request.
Please feel free to let me know if you have any questions.
Kind regards,
Theodora
@Theodora Boudale No both either documentation here (search for the 'variables' keyword) and BCLOUD-1955 are not my goal.
consider taskA and taskB as yaml anchors i can call when we need based on condition,simple if loop i have given as a use case.
let say i have 2 methods
taskA()
taskB()
When the bitbucket pipeline ask userinput if i enter 'A' or 'B' or 'C' it should perform the respective task
if (userinput == 'A')
taskA
else if (userinput == 'B')
taskB
else (userinput == 'C')
taskA
taskB
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @BHARATHKUREK ,
Thank you for your input and for explaining your use case.
Bitbucket Pipelines is based on YAML, and I am not sure if YAML allows using anchors inside commands like in the example you gave.
I would suggest opening a feature request about this in our issue tracker (including your explanation and use case) for our development team to consider, if this is possible.
Kind regards,
Theodora
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.