Skip to content

Commit

Permalink
add target env var
Browse files Browse the repository at this point in the history
  • Loading branch information
mchmarny committed May 7, 2023
1 parent 2dee824 commit 036f406
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.6.0
v0.6.1
11 changes: 4 additions & 7 deletions cloud/gcp/process.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ steps:
wait_for:
- scan-grype
secretEnv:
- _DB_CONN_STR
- VIMP_TARGET
args:
- --debug
- import
- --source=${_DIGEST}
- --file=./grype.json
- --target=${_DB_CONN_STR}

# trivy
- id: scan-trivy
Expand All @@ -28,13 +27,12 @@ steps:
wait_for:
- scan-trivy
secretEnv:
- _DB_CONN_STR
- VIMP_TARGET
args:
- --debug
- import
- --source=${_DIGEST}
- --file=./trivy.json
- --target=${_DB_CONN_STR}

# snyk
# NOTE: snyk exit with 1 if vulnerabilities are found
Expand All @@ -52,20 +50,19 @@ steps:
wait_for:
- scan-snyk
secretEnv:
- _DB_CONN_STR
- VIMP_TARGET
args:
- --debug
- import
- --source=${_DIGEST}
- --file=./snyk.json
- --target=${_DB_CONN_STR}

availableSecrets:
secretManager:
- versionName: projects/$PROJECT_NUMBER/secrets/snyk-token/versions/1
env: 'SNYK_TOKEN'
- versionName: projects/$PROJECT_NUMBER/secrets/db-conn-str/versions/1
env: '_DB_CONN_STR'
env: 'VIMP_TARGET'

options:
pool:
Expand Down
1 change: 1 addition & 0 deletions internal/cmd/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ var (
targetFlag = &c.StringFlag{
Name: "target",
Aliases: []string{"t"},
EnvVars: []string{"VIMP_TARGET"},
Usage: fmt.Sprintf("target (e.g. %s, etc.)", strings.Join(target.GetSampleTargets(), ", ")),
}

Expand Down

0 comments on commit 036f406

Please sign in to comment.