Try the matrix build

This commit is contained in:
Nikolai Rodionov 2023-10-20 21:55:21 +02:00
parent 283bcc5cd2
commit e1ce435597
No known key found for this signature in database
GPG Key ID: 19DB54039EBF8F10
5 changed files with 62 additions and 25 deletions

View File

@ -1,24 +0,0 @@
---
when:
event: push
steps:
Diff Badhouseplants:
image: ghcr.io/helmfile/helmfile:canary
secrets: [ sops_age_key, kubeconfig_content ]
commands:
- mkdir $HOME/.kube
- echo "$KUBECONFIG_CONTENT" > $HOME/.kube/config && chmod 0600 $HOME/.kube/config
- helmfile -e badhouseplants diff --suppress-secrets
Diff Eterosoft:
image: ghcr.io/helmfile/helmfile:canary
secrets: [ sops_age_key, kubeconfig_content ]
commands:
- mkdir $HOME/.kube
- echo "$KUBECONFIG_CONTENT" > $HOME/.kube/config && chmod 0600 $HOME/.kube/config
- helmfile -e etersoft diff --suppress-secrets
#services:
# kind:
# image: kindest/node:v1.27.3

31
.woodpecker/.cdh.yml Normal file
View File

@ -0,0 +1,31 @@
# ----------------------------------------------
# -- Check da helm pipeline
# ----------------------------------------------
when:
- event: push
# cron: nightly
steps:
check badhouseplants:
image: ghcr.io/allanger/check-da-helm-helmfile-secrets:stable
secrets:
- sops_age_key
environment:
RUST_LOG: info
commands:
- echo "Hey, bud, some helm releases are outdated:" > message_file.tpl
- cdh --kind helmfile -p $DRONE_WORKSPACE/helmfile.yaml --helmfile-environment badhouseplants -o >> message_file.tpl
notification:
image: deblan/woodpecker-email
settings:
from.address: woody@badhouseplants.net
from.name: Woody Woodpecker
host: badhouseplants.net
username:
from_secret: smtp_username
password:
from_secret: smtp_password
recipients:
subject: CDH result
target: main
when:
- status: [success, failure]

29
.woodpecker/.helmfile.yml Normal file
View File

@ -0,0 +1,29 @@
when:
event: push
matrix:
ENVIRONMENT:
- badhouseplants
- etersoft
steps:
diff:
image: ghcr.io/helmfile/helmfile:canary
secrets: [sops_age_key, kubeconfig_content]
when:
- branch:
exclude:
- main
commands:
- mkdir $HOME/.kube
- echo "$KUBECONFIG_CONTENT" > $HOME/.kube/config && chmod 0600 $HOME/.kube/config
- helmfile -e $ENVIRONMENT diff --suppress-secrets
sync:
image: ghcr.io/helmfile/helmfile:canary
secrets: [sops_age_key, kubeconfig_content]
when:
- branch:
include:
- main
commands:
- mkdir $HOME/.kube
- echo "$KUBECONFIG_CONTENT" > $HOME/.kube/config && chmod 0600 $HOME/.kube/config
- helmfile -e $ENVIRONMENT sync

View File

@ -97,7 +97,7 @@ releases:
namespace: istio-system
createNamespace: false
- <<: &vaultwarde
- <<: *vaultwarden
createNamespace: true
installed: true
namespace: vaultwarden-application

View File

@ -19,6 +19,7 @@ server:
WOODPECKER_GITEA: true
WOODPECKER_GITEA_URL: https://git.badhouseplants.net
WOODPECKER_GITEA_CLIENT: ab5e4687-a476-4668-9fbc-288d54095634
WOODPECKER_OPEN: true
WOODPECKER_ADMIN: "woodpecker,allanger"
WOODPECKER_HOST: "https://ci.badhouseplants.net"
extraSecretNamesForEnvFrom: []