Parameterized Workflow to pick certain value when triggering it
N
Nicusor Baluta
Right now to have the ability to build multiple versions of our app we have to declare a workflow for each one, and then set it to run with approval. This leads to us having to scroll through a looong list of waiting workflows to pick and run the one we need, each time we submit a new version. It would be great if we could just declare an enum with the names of the versions of the app, and create only one workflow that takes one value of the enum as a parameter to run, selectable from the circleci workflows page of the project, naturally this implies a pin functionality for that workflow in case of needing to run multiple version of the workflow/app on the same code submission
CCI-I-997
V
Vinny Thanh
Hi Nicusor,
You should be able to accomplish this with a combination of our pipeline trigger, conditional workflows, and additional pipeline parameters. See:
- https://circleci.com/docs/api/v2/#operation/triggerPipeline
- https://circleci.com/docs/2.0/pipeline-variables/#conditional-workflows
- https://circleci.com/docs/2.0/reusing-config/?section=configuration
E
Eric Dahlseng
E
Eric Dahlseng
This would also be extremely helpful for rollback situations!
We currently use a CircleCI workflow for deploying to production upon approval, which works great – except for rollback... when we've discovered a bug that was introduced more than one deployment ago, the only option we have is a very manual process for deploying a specific older version. If there was a way to specify input arguments for a manual workflow, then we could easily use a CircleCI workflow to rollback to arbitrary versions!