From cfb5749b12457bddaaaf6a1a83932d6aa4101455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Piliszek?= Date: Mon, 8 Apr 2024 11:07:15 +0200 Subject: [PATCH] Install helm releases the usual way This is to ensure that all helm releases installations succeed. [CI] Switch testing to the entire platform. Change-Id: If8fba281e25d7bf412b11ec01e1e2469cde06ef6 --- playbooks/helm/run.yaml | 20 +++++++++++++++----- zuul.d/project.yaml | 26 ++++++++++++-------------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/playbooks/helm/run.yaml b/playbooks/helm/run.yaml index 493f8be..1819237 100644 --- a/playbooks/helm/run.yaml +++ b/playbooks/helm/run.yaml @@ -1,15 +1,25 @@ - hosts: all tasks: - - name: Install helm charts - include_role: - name: helm-template + - name: Pull helm charts deps + command: "helm dependency build {{ helm_chart }}" vars: - helm_release_name: "{{ zj_item.key }}" helm_chart: "{{ zj_item.value }}" - helm_wait_for_pods: false # we want this once and with more control loop: "{{ helm_charts | dict2items }}" loop_control: loop_var: 'zj_item' + args: + chdir: "{{ zuul.project.src_dir }}" + + - name: Install helm charts + command: "helm install {{ helm_release_name }} {{ helm_chart }}" + vars: + helm_release_name: "{{ zj_item.key }}" + helm_chart: "{{ zj_item.value }}" + loop: "{{ helm_charts | dict2items }}" + loop_control: + loop_var: 'zj_item' + args: + chdir: "{{ zuul.project.src_dir }}" - name: Wait for the deployments command: kubectl wait --for=condition=Available --timeout=300s deployment --all diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index 7ef7d1a..a8b53b2 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -22,20 +22,6 @@ # NOTE: hackish way to only run it when its definition changes # as no files exist in this repo that control its behaviour - ^never-existing-file$ - - nebulous-component-template-apply-helm-charts: - vars: - zuul_work_dir: src/opendev.org/nebulous/component-template - required-projects: - - nebulous/component-template - files: &nebulous-component-template-apply-helm-charts-files - - ^playbooks/helm/ - - ^playbooks/kubernetes/ - - ^roles/check-pod-restarts/ - - ^roles/collect-kubernetes-pods-logs/ - - ^roles/collect-kubernetes-state/ - - ^roles/ensure-minikube/ - - opendev-buildset-registry: - files: *nebulous-component-template-apply-helm-charts-files # cross-testing with library-template - nebulous-library-template-build-java-libraries: @@ -48,5 +34,17 @@ - ^roles/install-jdk/ - ^roles/install-maven/ + # cross-testing the main helm gate + - nebulous-platform-apply-helm-charts: + files: &nebulous-component-template-apply-helm-charts-files + - ^playbooks/helm/ + - ^playbooks/kubernetes/ + - ^roles/check-pod-restarts/ + - ^roles/collect-kubernetes-pods-logs/ + - ^roles/collect-kubernetes-state/ + - ^roles/ensure-minikube/ + - opendev-buildset-registry: + files: *nebulous-component-template-apply-helm-charts-files + gate: jobs: *check-jobs