From 3fe3e4606a7dc493ac87bbcf497f63c84c3d371f Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Sat, 18 Feb 2023 18:40:49 +0100 Subject: [PATCH] Create a pipeline for appluing --- .drone.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) diff --git a/.drone.yml b/.drone.yml index d2b8418..76c780f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,10 +1,17 @@ --- # ---------------------------------------------- -# -- Helmfile apply changes +# -- Helmfile diff changes # ---------------------------------------------- kind: pipeline type: kubernetes -name: Apply helmfile changes +name: Show helmfile diffs + +trigger: + branch: + exclude: + - main + event: + - push steps: - name: Diff badhouseplants @@ -26,3 +33,39 @@ steps: - mkdir $HOME/.kube - echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config - helmfile -e eterosoft diff + +--- +# ---------------------------------------------- +# -- Helmfile apply changes +# ---------------------------------------------- +kind: pipeline +type: kubernetes +name: Apply helmfile changes + +trigger: + branch: + - main + event: + - push + +steps: +- name: Diff badhouseplants + image: ghcr.io/helmfile/helmfile:canary + environment: + KUBECONFIG_CONTENT: + from_secret: KUBECONFIG_CONTENT + commands: + - mkdir $HOME/.kube + - echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config + - helmfile -e badhouseplants apply + +- name: Diff eterosoft + image: ghcr.io/helmfile/helmfile:canary + environment: + KUBECONFIG_CONTENT: + from_secret: KUBECONFIG_CONTENT + commands: + - mkdir $HOME/.kube + - echo $KUBECONFIG_CONTENT | base64 -d > $HOME/.kube/config + - helmfile -e eterosoft apply +