Try the matrix build
This commit is contained in:
31
.woodpecker/.cdh.yml
Normal file
31
.woodpecker/.cdh.yml
Normal 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
29
.woodpecker/.helmfile.yml
Normal 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
|
Reference in New Issue
Block a user