Secrets

YAML tags for secret block

The secret tag is intended to be used to pull secrets from the Vela server or execute plugins to write the external secrets to the build volume.

---
# This document is displaying all the required tags
# to pull various secret types.
secrets:
  # Below is displaying the declarative secret definitions.
  - name: foo1
    key: go-vela/docs/foo1
    engine: native
    type: repo
  - name: foo2
    key: go-vela/foo2
    engine: native
    type: org
  - name: foo3
    key: go-vela/admins/foo3
    engine: native
    type: shared
  - name: vault_token
    key: go-vela/vault_token
    engine: native
    type: org

  # Below is displaying executing a secret plugin.
  - origin:
     name: External Vault Secret
     image: target/secret-vault:latest
     secrets: [ vault_token ]
     parameters:
       addr: vault.company.com
       auth_method: token
       username: vela
       token: sometoken
       items:
         - source: secret/vela
           path: user

Tags

TagRequiredTypeDescription
nameYstringName of secret to reference in the pipeline.
keyNstringPath to secret to fetch from storage backend.
engineNstringName of storage backend to fetch secret from.
typeNstringType of secret to fetch from storage backend.
pullNstringWhen to pull in secrets from storage backend.
originNstructDeclaration to pull secrets from non-internal secret providers.

The name: tag

---
secrets:
    # Name of secret to reference in the pipeline.
  - name: postgres

The key: tag

---
secrets:
    # Path to secret to fetch from storage backend. Displaying a
    # repo type secret.
  - key: go-vela/docs/foo1

    # Path to secret to fetch from storage backend. Displaying a
    # org type secret.
  - key: go-vela/foo1

    # Path to secret to fetch from storage backend. Displaying a
    # shared type secret.
  - key: go-vela/admins/foo1

The engine: tag

---
secrets:
    # Name of storage backend to fetch secret from, "native" signifies
    # the backend provider is the Vela database.
  - engine: native

The type: tag

---
secrets:
    # Type of secret to fetch from storage backend.
    # By default, Vela can pull repo but type accepts the
    # following values: repo, org, and shared
  - type: repo

The pull: tag

---
secrets:
    # When to pull in secrets from storage backend.
    # By default, Vela will pull at the beginning of a build but
    # accepts the following values: build_start, step_start
  - pull: step_start

The origin: tag

TagRequiredTypeDescription
nameYstringUnique identifier for the container in the pipeline.
imageY[]stringDocker image used to create an ephemeral container.
pullNstringDeclaration to configure if and when the Docker image is pulled.
secretsNstructSensitive variables injected into the container environment.
environmentNmap
rulesetNstructConditions to limit the execution of the container.
parametersNmapExtra configuration variables specific to a plugin.