microscopic-river-74022
02/15/2024, 9:08 PMmicroscopic-river-74022
02/15/2024, 9:08 PM${actions.deploy.<name>.mode}
template string. If referenced in the action itself, you can use ${this.mode}
, but this would not be backward compatible with version 0.12.
Here is an example config that works with both Bonsai and 0.12:
yaml
variables:
sync-mode: ${command.params contains 'sync' && (command.params.sync contains 'api' || isEmpty(command.params.sync))}
dev-mode: ${command.name == 'dev' || (command.params contains 'dev-mode' && (command.params.dev-mode contains 'api' || isEmpty(command.params.dev-mode)))}
In this block, the variables sync-mode
or dev-mode
are set to true if the relative mode is requested for the api
service/deploy. Sync mode or dev mode have been requested if either var.sync-mode
or var.dev-mode
are true. You can use a template expression like ${var.sync-mode || var.dev-mode ? 'yes' : 'no'}
to change the behaviour of your actions or modules.
For more details, you can refer to the Garden documentation ().
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------