Skip to content

feat(exec): report missing secrets#595

Merged
ecrupper merged 7 commits intomainfrom
feat/exec/report-missing-secrets
Jul 7, 2025
Merged

feat(exec): report missing secrets#595
ecrupper merged 7 commits intomainfrom
feat/exec/report-missing-secrets

Conversation

@wass3r
Copy link
Collaborator

@wass3r wass3r commented Feb 3, 2025

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

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.

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 wass3r requested a review from a team as a code owner February 3, 2025 03:55
@codecov
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

Attention: Patch coverage is 81.53846% with 12 lines in your changes missing coverage. Please review.

Project coverage is 75.25%. Comparing base (e402880) to head (ad0f39c).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
action/pipeline/exec.go 81.53% 12 Missing ⚠️

❌ Your project status has failed because the head coverage (75.25%) is below the target coverage (90.00%). You can increase the head coverage or adjust the target coverage.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #595      +/-   ##
==========================================
+ Coverage   74.79%   75.25%   +0.46%     
==========================================
  Files         173      173              
  Lines        7890     7956      +66     
==========================================
+ Hits         5901     5987      +86     
+ Misses       1685     1665      -20     
  Partials      304      304              
Files with missing lines Coverage Δ
action/pipeline/exec.go 30.82% <81.53%> (+30.82%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

ecrupper
ecrupper previously approved these changes Feb 3, 2025
Copy link
Contributor

@ecrupper ecrupper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slick

@ecrupper ecrupper merged commit 309a875 into main Jul 7, 2025
16 of 17 checks passed
@ecrupper ecrupper deleted the feat/exec/report-missing-secrets branch July 7, 2025 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants