Lifecycle and Execution
How Generic artifacts execute across deployment stages, with per-stage configuration and smart execution caching.
Lifecycle configuration
When to use lifecycle config vs. environment variable detection
Approach
Best for
Basic structure
{
"native": {
"type": "generic",
"image": "custom/tool:1.0",
"command": ["tool"],
"args": ["default-action"],
"lifecycle": {
"plan": {
"args": ["plan", "--detailed"]
},
"apply": {
"args": ["apply", "--auto-approve"]
},
"destroy": {
"args": ["destroy", "--force"]
}
}
}
}Phase fields
Field
Type
Description
Default
Skipping stages
Environment variables
BRICKS_ACTION
Value
Stage
BRICKS_STATE
BRICKS_JOB_ID
Execution behavior
Container executes when:
Container skips when:
Forcing execution
Example: database migration
Stage
What happens
Last updated
Was this helpful?

