Skip to main content

Update

Command

$ vela update secret <parameters...> <arguments...>
tip

For more information, you can run vela update secret --help.

Parameters

The following parameters are used to configure the command:

NameDescriptionEnvironment Variables
orgname of organization for the secretVELA_ORG, SECRET_ORG
reponame of repository for the secretVELA_REPO, SECRET_REPO
secret.enginename of engine that stores the secretVELA_ENGINE. SECRET_ENGINE
secret.typename of type of secret being storedVELA_TYPE, SECRET_TYPE
teamname of team for the secretVELA_TEAM, SECRET_TEAM
namename of the secretVELA_NAME, SECRET_NAME
valuevalue of the secretVELA_VALUE, SECRET_VALUE
imagebuild image(s) that can access the secretVELA_IMAGES, SECRET_IMAGES
eventbuild event(s) that can access the secretVELA_EVENTS, SECRET_EVENTS
commandsallows a step with commands to access the secretVELA_COMMANDS, SECRET_COMMANDS
substitutionallows substitution of secret using ${KEY} formatVELA_SUBSTITUTION, SECRET_SUBSTITUTION
filename of file used to add the secret(s)VELA_FILE, SECRET_FILE
outputformat the output for the secretVELA_OUTPUT, SECRET_OUTPUT
tip

This command also supports setting the following parameters via a configuration file:

  • secret.engine
  • secret.type
  • org
  • repo
  • output

For more information, please review the CLI config documentation.

Permissions

COMING SOON!

Sample

warning

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 update secret --secret.engine native --secret.type repo --name foo --value bar

Targeted Request

$ vela update secret --secret.engine native --secret.type repo --org github --repo octocat --name foo --value bar

Response

secret "foo" was updated

Advanced

Input From File

Vela supports updating a single-line or multi-line secret from a file using the @ symbol.

# Syntax
vela update secret --secret.engine native --secret.type repo --org github --repo octocat --name foo --value @/path/to/file

# Example
vela update secret --secret.engine native --secret.type repo --org github --repo octocat --name foo --value @$HOME/tmp/secret.txt

Secrets From File

Vela supports updating multiple secrets from a file using the filename parameter.

vela update secret -f secret.yml

Single YAML document

---
metadata:
version: v1
engine: native
secrets:
- org: octocat
repo: github
name: foo
value: bar
type: repo
images:
- golang:latest
events:
- push
- pull_request
- org: github
team: octokitties
name: foo1
value: "@/path/to/file/bar1"
type: shared
images:
- golang:latest
events:
- push
- pull_request

Multiple YAML document

---
metadata:
version: v1
engine: native
secrets:
- org: github
repo: octocat
name: foo
value: bar
type: repo
images:
- golang:latest
events:
- push
- pull_request

---
metadata:
version: v1
engine: vault
secrets:
- org: github
team: octokitties
name: foo1
value: "@/path/to/file/bar1"
type: shared
images:
- golang:latest
events:
- push
- pull_request