From e1ce435597f7614e1a7ee5cc2e737eb0134f554a Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Fri, 20 Oct 2023 21:55:21 +0200 Subject: [PATCH] Try the matrix build --- .woodpecker.yml | 24 -------------- .woodpecker/.cdh.yml | 31 +++++++++++++++++++ .woodpecker/.helmfile.yml | 29 +++++++++++++++++ badhouseplants/helmfile.yaml | 2 +- .../values/values.woodpecker-ci.yaml | 1 + 5 files changed, 62 insertions(+), 25 deletions(-) delete mode 100644 .woodpecker.yml create mode 100644 .woodpecker/.cdh.yml create mode 100644 .woodpecker/.helmfile.yml diff --git a/.woodpecker.yml b/.woodpecker.yml deleted file mode 100644 index b18ba77..0000000 --- a/.woodpecker.yml +++ /dev/null @@ -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 diff --git a/.woodpecker/.cdh.yml b/.woodpecker/.cdh.yml new file mode 100644 index 0000000..89050ab --- /dev/null +++ b/.woodpecker/.cdh.yml @@ -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] diff --git a/.woodpecker/.helmfile.yml b/.woodpecker/.helmfile.yml new file mode 100644 index 0000000..16f03ca --- /dev/null +++ b/.woodpecker/.helmfile.yml @@ -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 diff --git a/badhouseplants/helmfile.yaml b/badhouseplants/helmfile.yaml index 5023f26..89ced65 100644 --- a/badhouseplants/helmfile.yaml +++ b/badhouseplants/helmfile.yaml @@ -97,7 +97,7 @@ releases: namespace: istio-system createNamespace: false - - <<: &vaultwarde + - <<: *vaultwarden createNamespace: true installed: true namespace: vaultwarden-application diff --git a/badhouseplants/values/values.woodpecker-ci.yaml b/badhouseplants/values/values.woodpecker-ci.yaml index 51b5f98..c19c116 100644 --- a/badhouseplants/values/values.woodpecker-ci.yaml +++ b/badhouseplants/values/values.woodpecker-ci.yaml @@ -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: []