changes
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

This commit is contained in:
2025-04-11 17:04:02 +02:00
parent ec883f6b16
commit 5ab54edea1

View File

@ -1,5 +1,48 @@
steps: steps:
build: build_api_modules:
image: openapitools/openapi-generator-cli:v7.12.0
commands:
- docker-entrypoint.sh generate -i https://dtrack-api.hottis.de/api/openapi.json -g python -o /work/defectdojo-client --package-name defectdojo_api
when:
- event: [push, tag]
scan:
image: quay.io/wollud1969/woodpecker-helper:0.5.1
environment:
TRIVY_TOKEN:
from_secret: trivy_token
TRIVY_URL:
from_secret: trivy_url
DTRACK_API_KEY:
from_secret: dtrack_api_key
DTRACK_API_URL:
from_secret: dtrack_api_url
commands:
- export GOPATH=/woodpecker/go # the export is required, otherwise trivy will not consider the variable
- HOME=/home/`id -nu`
- TAG="${CI_COMMIT_TAG:-$CI_COMMIT_SHA}"
- |
trivy fs \
--server $TRIVY_URL \
--token $TRIVY_TOKEN \
--format cyclonedx \
--scanners license \
--output /tmp/sbom.xml \
.
- cat /tmp/sbom.xml
- |
curl -X "POST" \
-H "Content-Type: multipart/form-data" \
-H "X-Api-Key: $DTRACK_API_KEY" \
-F "autoCreate=true" \
-F "projectName=$CI_REPO" \
-F "projectVersion=$TAG" \
-F "bom=@/tmp/sbom.xml"\
"$DTRACK_API_URL/api/v1/bom"
when:
- event: [tag]
dockerize:
image: plugins/kaniko image: plugins/kaniko
settings: settings:
repo: ${FORGE_NAME}/${CI_REPO} repo: ${FORGE_NAME}/${CI_REPO}
@ -13,24 +56,20 @@ steps:
dockerfile: Dockerfile dockerfile: Dockerfile
when: when:
- event: [push, tag] - event: [push, tag]
scan_image:
image: aquasec/trivy deploy:
image: quay.io/wollud1969/woodpecker-helper:0.5.1
environment:
KUBE_CONFIG_CONTENT:
from_secret: kube_config
ENCRYPTION_KEY:
from_secret: encryption_key
MD5_CHECKSUM:
from_secret: secrets_checksum
commands: commands:
- trivy image $FORGE_NAME/$CI_REPO:$CI_COMMIT_SHA --quiet --exit-code 1 - export IMAGE_TAG=$CI_COMMIT_TAG
when: - printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
- event: [push, tag] - export KUBECONFIG=/tmp/kubeconfig
build: - ./deployment/deploy.sh
image: plugins/kaniko
settings:
repo: quay.io/wollud1969/woodpecker-helper
registry: quay.io
tags:
- latest
- ${CI_COMMIT_TAG}
username:
from_secret: quay_username
password:
from_secret: quay_password
dockerfile: Dockerfile
when: when:
- event: [tag] - event: [tag]