This means adding an endpoint to the api, something like GET /api/v1/tool/<toolname>/deploys/<deployid>/cancel, that will update the deployment CRD to notify the deployment task that it should cancel itself (as that one is running as a background process).
In the task, we should add in the loop that checks the status of the builds checking also for that flag in the CRD and if found cancel all the builds that are running and report back on the CRD.
We should also add the CANCELLED status for a deployment, and show the build as cancelled too.
Note that the runs can't currently be cancelled, so this is just for deployments that have not gotten yet to that stage.
Then the cli should just add a new subcommand deployment cancel and show the new status in the list/show subcommands.