add incomplete ci script

This commit is contained in:
Wolfgang Hottgenroth 2024-01-23 16:15:26 +01:00
parent 89089f429c
commit b68e929c57

29
.woodpecker.yml Normal file
View File

@ -0,0 +1,29 @@
steps:
build:
image: plugins/kaniko
settings:
repo: gitea.hottis.de/wn/snmp-mqtt
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
dockerfile: Dockerfile
when:
- event: [push, tag]
deploy:
image: portainer/kubectl-shell:latest
secrets:
- source: kube_config
target: KUBE_CONFIG_CONTENT
- source: image_name
target: IMAGE_NAME
commands:
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
- export KUBECONFIG=/tmp/kubeconfig
- cat $CI_WORKSPACE/deployment/deploy-yml.tmpl | sed -e 's,%IMAGE%,'$IMAGE_NAME':'$CI_COMMIT_TAG',' | kubectl apply -f -
when:
- event: tag