3 Commits
1.0.7 ... 0.0.1

Author SHA1 Message Date
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
4ea8a3688b fix 2023-11-08 18:33:49 +01:00
4 changed files with 37 additions and 19 deletions

33
.woodpecker.yml Normal file
View File

@ -0,0 +1,33 @@
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
- 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
- cat ./deployment/install-yml.tmpl | sed -e 's,%IMAGETAG%,'$IMAGE_TAG','g | kubectl apply -f -
when:
- event: tag

View File

@ -22,7 +22,6 @@ RUN \
RUN \
mkdir -p ${APP_DIR} && \
mkdir -p ${CONF_DIR} && \
useradd -d ${APP_DIR} -u 1000 user
COPY ./src/pv_controller/*.py ${APP_DIR}/

View File

@ -1,14 +0,0 @@
[mqtt]
broker = 172.16.2.16
port = 1883
# login =
# password =
# ca =
# cert =
# key =
relaisSubscribeTopic = IoT/PV/Cmd
meterPublishTopic = IoT/PV/Values
meterPublishPeriod = 15
[modbus]
gateway = 172.16.2.42

View File

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