diff --git a/.zuul.yaml b/.zuul.yaml index 92eef5a..2b76e9d 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -16,14 +16,29 @@ - job: description: Operator integration tests with Kubernetes name: zuul-operator-functional-k8s + abstract: true parent: zuul-operator-functional pre-run: - playbooks/zuul-operator-functional/pre-k8s.yaml - - playbooks/zuul-operator-functional/install_templates.yaml nodeset: ubuntu-bionic vars: namespace: 'default' +- job: + description: Operator integration tests with Kubernetes using templates + name: zuul-operator-functional-k8s-template + parent: zuul-operator-functional-k8s + pre-run: + - playbooks/zuul-operator-functional/install_templates.yaml + +- job: + description: Operation integration tests with Kubernetes using helm + name: zuul-operator-functional-k8s-helm + parent: zuul-operator-functional-k8s + pre-run: + - playbooks/zuul-operator-functional/pre-k8s.yaml + - playbooks/zuul-operator-functional/install_helm.yaml + - job: description: Image and buildset registry job name: zuul-operator-build-image @@ -113,7 +128,9 @@ - zuul-nox-docs - zuul-operator-helm-lint - zuul-operator-build-image - - zuul-operator-functional-k8s: + - zuul-operator-functional-k8s-template: + dependencies: zuul-operator-build-image + - zuul-operator-functional-k8s-helm: dependencies: zuul-operator-build-image gate: jobs: @@ -121,8 +138,10 @@ - zuul-nox-docs - zuul-operator-helm-lint - zuul-operator-upload-image - - zuul-operator-functional-k8s: + - zuul-operator-functional-k8s-template: dependencies: zuul-operator-upload-image + - zuul-operator-functional-k8s-helm: + dependencies: zuul-operator-build-image promote: jobs: - zuul-promote-nox-docs diff --git a/playbooks/zuul-operator-functional/install_helm.yaml b/playbooks/zuul-operator-functional/install_helm.yaml new file mode 100644 index 0000000..2bf126d --- /dev/null +++ b/playbooks/zuul-operator-functional/install_helm.yaml @@ -0,0 +1,21 @@ +- name: install and start zuul operator + hosts: all + roles: + - role: ensure-helm + vars: + helm_version: 3.10.1 + vars: + # Override this if you are running the operator interactively + # locally for development. + install_operator: true + zuul_work_dir: "{{ zuul.projects['opendev.org/zuul/zuul-operator'].src_dir }}" + tasks: + - name: Install Operator + when: install_operator + command: helm install --set image.tag=latest,cert-manager.enabled=true,pxc-operator.enabled=true test helm/zuul-operator + args: + chdir: "{{ zuul_work_dir }}" + + - name: Wait for operator deployment + when: install_operator + command: timeout 8m kubectl rollout status deployment/test-zuul-operator