CLI Cheatsheet
CLI usage
The CLI binary is armory. Usage is armory [command]. Run armory help to see a list of commands.
Global Flags
-h, --help: Help-o, --output: Set the output type. Available options arejsonandyaml. The default is plain text.-v, --verbose: Verbose output
CLI autocomplete
Generate the autocompletion script for armory for the specified shell.
Usage
armory completion [command]
Available Commands
bashfishpowershellzsh
See each available command’s help for details on how to use the generated script.
CLI help
Lists the usage and available commands.
Usage
armory help
Configure CD-as-a-Service
Apply configuration. See Add Tenants, Create an RBAC Role.
Usage
armory config apply -f <path-to-config.yaml>
View configuration
Usage
armory config get
Deploy an application
Usage
armory deploy start [flags]
Flags
-a, --authToken: (Optional) The authentication token to use rather thanclientIdandclientSecretor user login.--add-context: (Optional) Comma-delimited list of new context variables inname=valueformat. These are added to your canary analysis and webhook triggers.-n, --application: (Optional) The app name for deployment.-c, --clientId: (Optional) The Client ID for connecting to Armory CD-as-a-Service.-f, --file: (Required) The path to the deployment file.-n, --application: (Optional) The app name for deployment.-s, --clientSecret: (Optional) The Client Secret for connecting to Armory CD-as-a-Service.
Use only one of the following ways to authenticate your deployment: armory login or --clientId and --clientSecret or --authToken.
Examples
You are in the directory where your deployment file deploy.yaml is located. To deploy your app, execute:
armory deploy start -f deploy.yaml
To deploy your app with new context variables:
armory deploy start -f deploy.yml --add-context=pr=myprnumber,jira=myjiranumber
To deploy your app without first manually logging into CD-as-a-Service, pass your Client ID and Client Secret:
armory deploy start -c <your-client-id> -s <your-client-secret> -f deploy.yml
Download and deploy a sample app
Download a sample app from an Armory repo. Then deploy that sample app.
Usage
armory quick-start
Generate deployment templates
Blue/green
Generate a customizable Kubernetes blue/green deployment template.
Usage
armory template kubernetes bluegreen
Example
To generate a template and save the output to a file:
armory template kubernetes bluegreen > deploy-bluegreen.yaml
Canary
Generate a customizable Kubernetes canary deployment template.
Usage
armory template kubernetes canary -f automated
Example
To generate a canary template and save the output to a file:
armory template kubernetes canary -f automated > deploy-canary-traffic.yaml
Get the CLI version
Usage
armory version
Log into Armory CD-as-a-Service
Usage
armory login [flags]
Flags
-e, --envName: (Optional) The name of your Armory CD-as-a-Service environment. Names with spaces must be enclosed in single or double quotes.
Example
If your environment is named dev, execute:
armory login -e dev
If your environment is named dev team, execute:
armory login -e 'dev team'
If you don’t include your environment, the command returns with a list of environments. You must select one to continue.
Log out of Armory CD-as-a-Service
Usage
armory logout [envName]
envName is optional.
When you execute the armory logout command, a prompt appears for user confirmation.
Feedback
Was this page helpful?
Thank you for letting us know!
Sorry to hear that. Please tell us how we can improve.
Last modified November 2, 2022: (56293d37)