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.
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.
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
When the bitbucket pipeline ask userinput if i enter 'A' or 'B' or 'C' it should perform the respective task
if (userinput == 'A')
else if (userinput == 'B')
else (userinput == 'C')
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.
We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events