Add
Learn how to create a deployment.
Command
$ vela add deployment <parameters...> <arguments...>
For more information, you can run
vela add deployment --help
.Parameters
The following parameters are used to configure the command:
Name | Description | Environment Variables |
---|---|---|
org | name of organization for the deployment | VELA_ORG , DEPLOYMENT_ORG |
repo | name of repository for the deployment | VELA_REPO , DEPLOYMENT_REPO |
ref | name of branch, commit, or tag for the deployment | VELA_DEPLOYMENT , DEPLOYMENT_NUMBER |
target | name of target environment for the deployment | VELA_TARGET , DEPLOYMENT_TARGET |
description | short description for the deployment | VELA_DESCRIPTION , DEPLOYMENT_DESCRIPTION |
parameter | parameter(s) in key=value format for the deployment | VELA_PARAMETERS, , DEPLOYMENT_PARAMETERS |
task | name of task for the deployment | VELA_TASK , DEPLOYMENT_TASK |
output | format the output for the deployment | VELA_OUTPUT , DEPLOYMENT_OUTPUT |
This command also supports setting the following parameters via a configuration file:
org
repo
output
For more information, please review the CLI config documentation.
Sample
This section assumes you have already installed and setup the CLI.
To install the CLI, please review the installation documentation.
To setup the CLI, please review the authentication documentation.
Request
$ pwd
~/github/octocat
$ vela add deployment
Targeted Request
$ vela add deployment --org github --repo octocat
Response generated from successful CLI command
deployment "https://api.github.com/repos/github/octocat/deployments/1" was created
Examples
EXAMPLES:
1. Add a deployment for a repository.
$ vela add deployment --org MyOrg --repo MyRepo
2. Add a deployment for a repository with a specific target environment.
$ vela add deployment --org MyOrg --repo MyRepo --target stage
3. Add a deployment for a repository with a specific branch reference.
$ vela add deployment --org MyOrg --repo MyRepo --ref dev
4. Add a deployment for a repository with a specific commit reference.
$ vela add deployment --org MyOrg --repo MyRepo --ref 48afb5bdc41ad69bf22588491333f7cf71135163
5. Add a deployment for a repository with a specific tag.
$ vela add deployment --org MyOrg --repo MyRepo --ref 'refs/tags/example.tag'
6. Add a deployment for a repository with a specific description.
$ vela add deployment --org MyOrg --repo MyRepo --description 'my custom message'
7. Add a deployment for a repository with two parameters.
$ vela add deployment --org MyOrg --repo MyRepo --parameter 'key=value' --parameter 'foo=bar'
8. Add a deployment for a repository when config or environment variables are set.
$ vela add deployment
Last modified November 7, 2023: fix(docs): add-deployment-example-for-tag (#388) (cace05fd)