2024-01-11 14:11:43 +01:00
|
|
|
steps:
|
|
|
|
build:
|
|
|
|
image: plugins/kaniko
|
|
|
|
settings:
|
|
|
|
repo: gitea.hottis.de/wn/pv-controller
|
|
|
|
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]
|
|
|
|
|
2024-01-11 14:23:54 +01:00
|
|
|
deploy:
|
|
|
|
image: portainer/kubectl-shell:latest
|
|
|
|
secrets:
|
|
|
|
- source: kube_config
|
|
|
|
target: KUBE_CONFIG_CONTENT
|
|
|
|
commands:
|
|
|
|
- export IMAGE_TAG=$CI_COMMIT_TAG
|
|
|
|
- printf "$KUBE_CONFIG_CONTENT" > /tmp/kubeconfig
|
|
|
|
- export KUBECONFIG=/tmp/kubeconfig
|
|
|
|
- cat ./deployment/install-yml.tmpl | sed -e 's,%IMAGETAG%,'$IMAGE_TAG','g | kubectl apply -f -
|
|
|
|
when:
|
|
|
|
- event: tag
|
|
|
|
|