diff --git a/doc/source/helm-jobs.rst b/doc/source/helm-jobs.rst index 4c951afd2..7214ab12a 100644 --- a/doc/source/helm-jobs.rst +++ b/doc/source/helm-jobs.rst @@ -1,4 +1,5 @@ Helm Jobs ========= -.. zuul:autojob:: chart-testing-lint +.. zuul:autojob:: apply-helm-charts +.. zuul:autojob:: chart-testing-lint \ No newline at end of file diff --git a/playbooks/helm/post.yaml b/playbooks/helm/post.yaml new file mode 100644 index 000000000..5242b7bf9 --- /dev/null +++ b/playbooks/helm/post.yaml @@ -0,0 +1,3 @@ +- hosts: all + roles: + - collect-container-logs diff --git a/playbooks/helm/pre.yaml b/playbooks/helm/pre.yaml new file mode 100644 index 000000000..4394152a1 --- /dev/null +++ b/playbooks/helm/pre.yaml @@ -0,0 +1,5 @@ +- hosts: all + roles: + - role: clear-firewall + - role: install-kubernetes + - role: ensure-helm diff --git a/playbooks/helm/run.yaml b/playbooks/helm/run.yaml new file mode 100644 index 000000000..829ded960 --- /dev/null +++ b/playbooks/helm/run.yaml @@ -0,0 +1,8 @@ +- hosts: all + tasks: + - include_role: + name: helm-template + vars: + helm_release_name: "{{ item.key }}" + helm_chart: "{{ item.value }}" + loop: "{{ helm_charts | dict2items }}" diff --git a/zuul.d/helm-jobs.yaml b/zuul.d/helm-jobs.yaml index b146d6f45..c39e145c1 100644 --- a/zuul.d/helm-jobs.yaml +++ b/zuul.d/helm-jobs.yaml @@ -4,3 +4,11 @@ Run chart-testing on Helm charts pre-run: playbooks/chart-testing/pre.yaml run: playbooks/chart-testing/run.yaml + +- job: + name: apply-helm-charts + description: | + Deploy a Kubernetes cluster and apply charts + pre-run: playbooks/helm/pre.yaml + run: playbooks/helm/run.yaml + post-run: playbooks/helm/post.yaml