This commit is contained in:
parent
574e2886f5
commit
71773968c9
@ -7,8 +7,6 @@ steps:
|
|||||||
- go mod tidy
|
- go mod tidy
|
||||||
- go build -a -installsuffix nocgo -o udi main.go
|
- go build -a -installsuffix nocgo -o udi main.go
|
||||||
- cp udi ../..
|
- cp udi ../..
|
||||||
- ls -l /woodpecker
|
|
||||||
- ls -l /woodpecker/go
|
|
||||||
|
|
||||||
scan:
|
scan:
|
||||||
image: quay.io/wollud1969/woodpecker-helper:0.5.1
|
image: quay.io/wollud1969/woodpecker-helper:0.5.1
|
||||||
@ -22,8 +20,9 @@ steps:
|
|||||||
DTRACK_API_URL:
|
DTRACK_API_URL:
|
||||||
from_secret: dtrack_api_url
|
from_secret: dtrack_api_url
|
||||||
commands:
|
commands:
|
||||||
- export GOPATH=/woodpecker/go
|
- export GOPATH=/woodpecker/go # the export is required, otherwise trivy will not consider the variable
|
||||||
- HOME=/home/`id -nu`
|
- HOME=/home/`id -nu`
|
||||||
|
- TAG="${CI_COMMIT_TAG:-$CI_COMMIT_SHA}
|
||||||
- |
|
- |
|
||||||
trivy fs \
|
trivy fs \
|
||||||
--server $TRIVY_URL \
|
--server $TRIVY_URL \
|
||||||
@ -39,7 +38,7 @@ steps:
|
|||||||
-H "X-Api-Key: $DTRACK_API_KEY" \
|
-H "X-Api-Key: $DTRACK_API_KEY" \
|
||||||
-F "autoCreate=true" \
|
-F "autoCreate=true" \
|
||||||
-F "projectName=$CI_REPO" \
|
-F "projectName=$CI_REPO" \
|
||||||
-F "projectVersion=$CI_COMMIT_SHA" \
|
-F "projectVersion=$TAG" \
|
||||||
-F "bom=@/tmp/sbom.xml"\
|
-F "bom=@/tmp/sbom.xml"\
|
||||||
"$DTRACK_API_URL/api/v1/bom"
|
"$DTRACK_API_URL/api/v1/bom"
|
||||||
when:
|
when:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user