Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(exec): report missing secrets #595

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

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.

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
Copy link

codecov bot commented Feb 3, 2025

Codecov Report

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

Project coverage is 79.23%. Comparing base (0a54351) to head (04c18bb).

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

❌ Your project check has failed because the head coverage (79.23%) 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   78.80%   79.23%   +0.43%     
==========================================
  Files         172      172              
  Lines        7785     7851      +66     
==========================================
+ Hits         6135     6221      +86     
+ Misses       1414     1394      -20     
  Partials      236      236              
Files with missing lines Coverage Δ
action/config/load.go 57.69% <ø> (ø)
action/secret/table.go 100.00% <100.00%> (ø)
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.

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

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.

3 participants