Add New Context Variables at Deploy Time
Add new context variables from the command line or in the Armory CD-as-a-Service GitHub Action. CD-as-a-Service injects these variables into your canary analysis and webhook triggers.
How to add new context variables
You can add new context variables at deployment time by using the --add-context argument on the command line or from within your Armory CD-as-a-Service GitHub Action. CD-as-a-Service adds the new context variables to webhook triggers and canary analysis steps in any deployment constraint.
The value of the --add-context argument is a comma-delimited list of key=value pairs.
For this example, you want to add the following new context variables:
| Name | Value |
|---|---|
| smokeTest | true |
| environment | prod |
| changeBy | jane-smith |
Your command line looks like this:
armory deploy start -f deploy.yml --add-context=smokeTest=true,environment=prod,changeBy=jane-doe
In your GitHub Action, you add an addContext key in your Deployment step.
| |
Known issues
Context variables are not added in the following situations:
- An
analysisstep when used in an after deployment constraint - A step in a blue/green deployment strategy
Feedback
Was this page helpful?
Thank you for letting us know!
Sorry to hear that. Please tell us how we can improve.
Last modified July 28, 2023: (3f5e759)