3 Commits
1.0.8 ... 0.0.2

Author SHA1 Message Date
6127129b03 cd-script fixed
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/tag/woodpecker Pipeline was successful
2024-01-11 14:26:25 +01:00
6564722727 cd-script added
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2024-01-11 14:23:54 +01:00
a65b991307 add woodpecker ci script
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2024-01-11 14:11:43 +01:00
2 changed files with 33 additions and 4 deletions

29
.woodpecker.yml Normal file
View File

@ -0,0 +1,29 @@
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]
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

View File

@ -1,13 +1,13 @@
apiVersion: v1 apiVersion: v1
kind: Namespace kind: Namespace
metadata: metadata:
name: pv-controller name: homea
--- ---
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: pv-controller name: pv-controller
namespace: pv-controller namespace: homea
data: data:
MQTT__BROKER: "emqx01-anonymous-cluster-internal.broker.svc.cluster.local" MQTT__BROKER: "emqx01-anonymous-cluster-internal.broker.svc.cluster.local"
MQTT__PORT: "1883" MQTT__PORT: "1883"
@ -20,7 +20,7 @@ apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: pv-controller name: pv-controller
namespace: pv-controller namespace: homea
labels: labels:
app: pv-controller app: pv-controller
spec: spec:
@ -35,7 +35,7 @@ spec:
spec: spec:
containers: containers:
- name: pv-controller - name: pv-controller
image: wollud1969/pv-controller:1.0.7 image: gitea.hottis.de/wn/pv-controller:%IMAGE%
envFrom: envFrom:
- configMapRef: - configMapRef:
name: pv-controller name: pv-controller