Support Force Apply with Cascade to Dependents in spacectl
Add support for triggering a force apply with cascade to dependents through spacectl, equivalent to the existing functionality available in the Spacelift UI.
Ideally, this would be exposed through additional flags on spacectl stack deploy, for example:
spacectl stack deploy --id <stack-id> --force-apply --cascade- Workaround
- Problem
Log in to comment and vote
Comments3
Magenta Field
Oct 15
Hi, this is already supported. Since spacectl
v1.21.0, stack deploy has a--force-applyflag:spacectl stack deploy --id <stack-id> --force-apply cascadecascadeforce applies the run and passes the force apply on to the dependent stacks it triggers, the same as cascade to dependents in the UI.singleforce applies only that run.The stack dependencies docs now include the CLI command: https://docs.spacelift.io/concepts/stack/stack-dependencies#trigger-with-force-apply
Beige Rain
Oct 15
Ah my mistake, my brew-installed version wasn’t automatically moved from the formula to cask as Spacelift’s tap doesn’t include a
tap_migrations.jsonfile.Steps to resolve for anyone else experiencing this:
# Check current spacectl version > spacectl version spacectl version: 1.18.3 # Uninstall spacectl formula > brew uninstall --formula spacectl # Reinstall spacectl as cask > brew reinstall --cask spacelift-io/spacelift/spacectl # Check current spacectl version updated > spacectl version spacectl version: 1.28.0 # --force-apply flag is now listed under OPTIONS spacectl stack deploy -h # ... OPTIONS: --force-apply single [Optional] Force apply: single (this stack only) or `cascade` (this stack and all dependencies)Beige Rain
Oct 14
This limitation is documented here for reference