From 5308b88bd4cbfac87028e1ec81a3fbc8b9e6a706 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Thu, 10 Oct 2024 07:43:58 +0200 Subject: [PATCH] Fix ci and add sa name tp the job --- .woodpecker/helmfile.yaml | 59 +++++++++++++++++++-------------------- 1 file changed, 28 insertions(+), 31 deletions(-) diff --git a/.woodpecker/helmfile.yaml b/.woodpecker/helmfile.yaml index 7183ee7..bf73d9c 100644 --- a/.woodpecker/helmfile.yaml +++ b/.woodpecker/helmfile.yaml @@ -5,37 +5,34 @@ matrix: include: - NAME: badhouseplants ENV: badhouseplants +.opts: &opts + secrets: + - sops_age_key + image: ghcr.io/helmfile/helmfile:latest + backend_options: + kubernetes: + serviceAccountName: woodpecker-ci + resources: + requests: + memory: 500Mi + cpu: 200m + limits: + memory: 500Mi + cpu: 200m steps: - test: - image: ghcr.io/helmfile/helmfile:latest + diff: + !!merge <<: *opts + when: + - branch: + exclude: + - main commands: - - kubectl get all -A - backend_options: - kubernetes: - serviceAccountName: woodpecker-ci - resources: - requests: - memory: 500Mi - cpu: 200m - limits: - memory: 500Mi - cpu: 200m - build: - image: ghcr.io/helmfile/helmfile:latest - commands: - - mkdir ~/.kube - - echo $K8S_CONFIG | base64 -d > ~/.kube/config - helmfile -e "${ENV}" diff - secrets: - - k8s_config - - sops_age_key - backend_options: - kubernetes: - serviceAccountName: woodpecker-ci - resources: - requests: - memory: 500Mi - cpu: 200m - limits: - memory: 500Mi - cpu: 200m + diff: + !!merge <<: *opts + when: + - branch: + include: + - main + commands: + - helmfile -e "${ENV}" apply