add token and ci script
Some checks failed
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline failed

This commit is contained in:
Wolfgang Hottgenroth 2025-02-03 12:50:52 +01:00
parent e3a74b9089
commit a24674d57e
Signed by: wn
GPG Key ID: 18FDFA577A8871AD
3 changed files with 31 additions and 0 deletions

16
.woodpecker.yml Normal file
View File

@ -0,0 +1,16 @@
steps:
deploy:
image: quay.io/wollud1969/woodpecker-helper:0.4.1
environment:
KUBE_CONFIG_CONTENT:
from_secret: kube_config
GPG_PASSPHRASE:
from_secret: gpg_passphrase
commands:
- export IMAGE_TAG=$CI_COMMIT_TAG
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
- export KUBECONFIG=/tmp/kubeconfig
- ./install.sh
when:
- event: tag

View File

@ -9,6 +9,13 @@ kubectl create namespace $NAMESPACE \
-o yaml | \ -o yaml | \
kubectl -f - apply kubectl -f - apply
eval "`cat secrets.asc | /usr/local/bin/decrypt-secrets.sh`"
kubectl create secret generic trivy-secret \
--dry-run=client \
-o yaml \
--save-config \
--from-literal=serverToken=$serverToken | \
kubectl apply -f - -n $NAMESPACE
helm repo add aquasecurity https://aquasecurity.github.io/helm-charts/ helm repo add aquasecurity https://aquasecurity.github.io/helm-charts/
helm repo update helm repo update

8
secrets.asc Normal file
View File

@ -0,0 +1,8 @@
-----BEGIN PGP MESSAGE-----
jA0ECQMInXOggkRURoP70owBc5Bp2aQL5X6HfMQkHEia+YXfOjg7aleWZjz5R0oE
8fwMoEy/trg82Y+L07/G7QzPHUJEM1wzFDLMIKw/LeiPCY/+U0L3EpCD5AnhZVDM
ooIthRKWX02TYTMpP7pIXlYuLsBQbisne4XeyQqZAky+DosMRihO1c7pQo1f/V2x
cEtEEQgvljNfa1XoOA==
=FXwX
-----END PGP MESSAGE-----