Working with plugins | Vela

Typically, plugins are configured as a step in a pipeline and should accept their configuration via environment variables. The below example shows a pipeline and secret plugin working together to publish an image to a registry:

version: "1"

steps:
- name: plugin
image: target/vela-kaniko
pull: always
parameters:
registry: index.docker.io
repo: index.docker.io/octocat/hello-world

secrets:
- name: vault_token
key: go-vela/vault_token
engine: native
type: org

- origin:
name: plugin
image: target/secret-vault
pull: always
secrets: [ vault_token ]
parameters:
addr: vault.example.com
auth_method: token
items:
- source: secret/docker
path: docker

We pass these variables in Vela using the parameters block. Any variable passed to this block, will be injected into the step as PARAMETER_<variable>:

From the above example, the following environment variables would be added to the containers: