cli icon indicating copy to clipboard operation
cli copied to clipboard

feat(exec): report missing secrets

Open wass3r opened this issue 3 weeks ago • 1 comments

this feature will print out any secrets not provided as a warning at the end of a vela exec pipeline.

for example, vela exec pipeline for the following pipeline:

version: "1"

stages:
  build:
    steps:
      - name: "build"
        image: alpine:latest
        secrets: [docker_username]
        commands:
          - echo "Hello World"

secrets:
  - name: docker_username
    key: org/repo/docker_username
    engine: native
    type: repo

will result in:

image

use vela exec pipeline --env DOCKER_USERNAME=shh (for example) and the warnings go away.

to note, the env var has to just exist to count as being supplied, even if its value is an empty string. however, in that scenario it will print a message when using --log.level debug.

image

also added tests for this feature and a previously added skip steps feature.

wass3r avatar Feb 03 '25 03:02 wass3r