Command-line interface¶
Usage instructions for the command-line interface.
codestream-cli¶
vRA utilities
usage: codestream-cli [-h] {docs,pipelines,token,variables} ...
- -h, --help¶
show this help message and exit
codestream-cli docs¶
Docs.
Subcommand to serve the sphinx documentation on localhost.
usage: codestream-cli docs [-h] [-p PORT] [-d DIRECTORY]
- -h, --help¶
show this help message and exit
- -p <port>, --port <port>¶
The Port. Specifies the port to serve the docs on. Note that this is only useful when run locally, as when run inside a container, the port is already exposed on the default.
- -d <directory>, --directory <directory>¶
The directory to serve the docs from. This directory needs to already exist or an error will be thrown.
codestream-cli pipelines¶
Code Stream pipelines.
Subcommand for working with vRA Code Stream pipelines.
Only one subcommand will be processed per execution.
usage: codestream-cli pipelines [-h] [-cp] [-dp] [-ep] [-exp] [-xp] [-gpex]
[-gpid] [-gp] [-ip] [-vp] [-f FILE]
[-i INPUTS] [-n NAME] [-p PROJECT]
- -h, --help¶
show this help message and exit
- -cp, --check-pipeline¶
Check if a pipeline exists by providing a name and project. Requires the following arguments passed globally. –url The vRA URL. Defaults to $CODESTREAM_CLI_VRA_URL –token The token to authenticate with. Requires the following arguments passed to the subcommand. –name The pipeline name –project The pipeline project
- -dp, --delete-pipeline¶
Delete a Code Stream pipeline. Requires the following arguments passed globally. –url The vRA URL. Defaults to $CODESTREAM_CLI_VRA_URL –token The token to authenticate with. Requires the following arguments passed to the subcommand. –name The pipeline name –project The pipeline project
- -ep, --enable-pipeline¶
Enable a Code Stream pipeline. Requires the following arguments passed globally. –url The vRA URL. Defaults to $CODESTREAM_CLI_VRA_URL –token The token to authenticate with. Requires the following arguments passed to the subcommand. –name The pipeline name –project The pipeline project
- -exp, --execute-pipeline¶
Execute a Code Stream pipeline. Requires the following arguments passed globally. –url The vRA URL. Defaults to $CODESTREAM_CLI_VRA_URL –token The token to authenticate with. Requires the following arguments passed to the subcommand. –name The pipeline name –project The pipeline project Optional arguments can be passed to the subcommand. –inputs Additional Pipeline inputs.
- -xp, --export-pipeline¶
Export a Code Stream pipeline. Requires the following arguments passed globally. –url The vRA URL. Defaults to $CODESTREAM_CLI_VRA_URL –token The token to authenticate with. Requires the following arguments passed to the subcommand. –name The pipeline name –project The pipeline project Optional arguments can be passed to the subcommand. –file Write the output to file instead of on-screen.
- -gpex, --get-pipeline-executions¶
Get pipeline executions by providing a name and project. Requires the following arguments passed globally. –url The vRA URL. Defaults to $CODESTREAM_CLI_VRA_URL –token The token to authenticate with. Requires the following arguments passed to the subcommand. –name The pipeline name –project The pipeline project
- -gpid, --get-pipeline-id¶
Get a pipeline ID by providing a name and project. Requires the following arguments passed globally. –url The vRA URL. Defaults to $CODESTREAM_CLI_VRA_URL –token The token to authenticate with. Requires the following arguments passed to the subcommand. –name The pipeline name –project The pipeline project
- -gp, --get-pipeline-info¶
Get info about a pipeline by providing a name and project. Requires the following arguments passed globally. –url The vRA URL. Defaults to $CODESTREAM_CLI_VRA_URL –token The token to authenticate with. Requires the following arguments passed to the subcommand. –name The pipeline name –project The pipeline project
- -ip, --import-pipeline¶
Import a Code Stream pipeline from a file. If a pipeline with the same name & project does not exist, it is imported. If the pipeline with the same name & project already exists, it is updated. Requires the following arguments passed globally. –url The vRA URL. Defaults to $CODESTREAM_CLI_VRA_URL –token The token to authenticate with. Requires the following arguments passed to the subcommand. –file The filename
- -vp, --validate-pipeline¶
Validate a Code Stream pipeline YAML file meets the schema. Requires the following arguments passed globally. None Requires the following arguments passed to the subcommand. –file The filename
- -f <file>, --file <file>¶
The file name of the Code Stream pipeline. The file provided is expected to be valid YAML.
- -i <inputs>, --inputs <inputs>¶
Additional pipeline variables provided as a JSON string.
- -n <name>, --name <name>¶
The Code Stream pipeline name. The name can contain spaces by passing a quoted string.
- -p <project>, --project <project>¶
The Code Stream pipeline project. The name can contain spaces by passing a quoted string.
codestream-cli token¶
Token.
Subcommand for obtaining a vRA token by providing a username and password.
usage: codestream-cli token [-h] [-rt] [-bt] [-u USERNAME] [-p PASSWORD]
- -h, --help¶
show this help message and exit
- -rt, --refresh-token¶
Get a refresh token Requires the following arguments passed globally. –url The URL for the vRA API Requires the following arguments passed to the subcommand. –username The username –password The password
- -bt, --bearer-token¶
Get a bearer access token NOTE: This is mostly used for debugging auth issues. Requires the following arguments passed globally. –url The URL for the vRA API –token The refresh token Requires the following arguments passed to the subcommand. None
- -u <username>, --username <username>¶
The username to get a Token for.
- -p <password>, --password <password>¶
The password for the user.
codestream-cli variables¶
Variable.
Subcommand for working with vRA variables.
usage: codestream-cli variables [-h] [-gv] [-sv] [-p PROJECT] [-n NAME]
[-d DESCRIPTION] [-t TYPE] [-v VALUE]
- -h, --help¶
show this help message and exit
- -gv, --get-variable¶
Get a variable. Requires the following arguments passed globally. –token The token to authenticate with. Requires the following arguments passed to the subcommand. –name The variable name –project The variable project
- -sv, --set-variable¶
Update a variable. Requires the following arguments passed globally. –token The token to authenticate with. Requires the following arguments passed to the subcommand. –name The variable name –project The variable project –value The variable content –description An optional variable description.
- -p <project>, --project <project>¶
Project where the variable is located. Requires the following arguments passed globally. –token The token to authenticate with. Requires the following arguments passed to the subcommand. –name The variable name
- -n <name>, --name <name>¶
Name of the variable. Requires the following arguments passed globally. –token The token to authenticate with. Requires the following arguments passed to the subcommand. –project The variable project
- -d <description>, --description <description>¶
An optional description for the variable. Requires the following arguments passed globally. –token The token to authenticate with. Requires the following arguments passed to the subcommand. –project The variable project –name The variable name
- -t <type>, --type <type>¶
The type of variable. Valid options are; REGULAR SECRET RESTRICTED Requires the following arguments passed globally. –token The token to authenticate with. Requires the following arguments passed to the subcommand. –project The variable project –name The variable name
- -v <value>, --value <value>¶
The contents of the variable. Requires the following arguments passed globally. –token The token to authenticate with. Requires the following arguments passed to the subcommand. –project The variable project –name The variable name