elo-rezept-rechner/.woodpecker.yml
Wolfgang Hottgenroth fb1249d37b
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
another trivy test, 2
2024-02-06 10:31:23 +01:00

61 lines
1.6 KiB
YAML

steps:
build:
image: plugins/kaniko
settings:
repo: gitea.hottis.de/moerp/elo-rezept-rechner
registry:
from_secret: container_registry
tags: latest,${CI_COMMIT_SHA},${CI_COMMIT_TAG}
username:
from_secret: container_registry_username
password:
from_secret: container_registry_password
build_args:
- VERSION_ID1=${CI_COMMIT_SHA}
- VERSION_ID2=${CI_COMMIT_TAG}
dockerfile: Dockerfile
when:
- event: [push, tag]
scan_filesystem:
image: woodpeckerci/plugin-trivy
scan_image:
image: aquasec/trivy
commands:
- trivy image gitea.hottis.de/moerp/elo-rezept-rechner:latest
deploytest:
image: portainer/kubectl-shell:latest
secrets:
- source: kube_config
target: KUBE_CONFIG_CONTENT
- source: encryption_key
target: ENCRYPTION_KEY
- source: secrets_checksum
target: MD5_CHECKSUM
commands:
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
- export KUBECONFIG=/tmp/kubeconfig
- ./deployment/deploy.sh test
when:
- event: [push, tag]
deploy:
image: portainer/kubectl-shell:latest
secrets:
- source: kube_config
target: KUBE_CONFIG_CONTENT
- source: encryption_key
target: ENCRYPTION_KEY
- source: secrets_checksum
target: MD5_CHECKSUM
commands:
- export IMAGE_TAG=$CI_COMMIT_TAG
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
- export KUBECONFIG=/tmp/kubeconfig
- ./deployment/deploy.sh
when:
- event: tag