If you trigger mabl from a CI/CD pipeline, you can now choose exactly which plans a deployment event runs by naming them by plan ID, with the mabl CLI or the mabl API. You no longer need to add a label to a plan just to run it on its own from a pipeline job. To use the new CLI options, update to mabl CLI version 2.138.44 or later.
Try it out
mabl CLI
To run one plan in the mabl cloud, use the new mabl plans run-cloud command:
mabl plans run-cloud --id {plan-id} --environment-id {environment-id}
To name several plans in one deployment event, add --plan-ids to mabl deployments create. If you also pass --labels, the plans that match those labels run too:
mabl deployments create --environment-id {environment-id} --plan-ids {plan-id} {plan-id}
mabl API
Send the plan IDs in plan_ids when you create a deployment event:
{
"environment_id": "FQWY5iMcfkmqV64YMyrt5w-e",
"plan_ids": ["cLhFR8Fz0Kpsh70zP6EQ3Q-p"]
}
Each named plan must be active, accept deployment triggers, and be associated with the environment or application in the deployment event. If any named plan can't run, mabl rejects the deployment event and no plans run, so a mistyped plan ID shows up as an error instead of a deployment event that ran nothing.