diff --git a/roles/deploy-env/defaults/main.yaml b/roles/deploy-env/defaults/main.yaml index 986803a58..b95fe749b 100644 --- a/roles/deploy-env/defaults/main.yaml +++ b/roles/deploy-env/defaults/main.yaml @@ -22,6 +22,9 @@ crictl_version: "v1.26.1" kubectl: user: zuul group: zuul + +osh_plugin_repo: "https://opendev.org/openstack/openstack-helm-plugin.git" + kubeadm: pod_network_cidr: "10.244.0.0/24" service_cidr: "10.96.0.0/16" diff --git a/roles/deploy-env/tasks/k8s_client.yaml b/roles/deploy-env/tasks/k8s_client.yaml index 629f390da..faf5f0ac2 100644 --- a/roles/deploy-env/tasks/k8s_client.yaml +++ b/roles/deploy-env/tasks/k8s_client.yaml @@ -43,8 +43,14 @@ args: executable: /bin/bash + - name: Install osh helm plugin + become_user: "{{ kubectl.user }}" + shell: | + helm plugin install {{ osh_plugin_repo }} + # This is to improve build time - name: Remove stable Helm repo + become_user: "{{ kubectl.user }}" command: helm repo remove stable ignore_errors: true diff --git a/roles/osh-run-script-set/tasks/main.yaml b/roles/osh-run-script-set/tasks/main.yaml index 3bddbb92c..e931e59ec 100644 --- a/roles/osh-run-script-set/tasks/main.yaml +++ b/roles/osh-run-script-set/tasks/main.yaml @@ -15,6 +15,7 @@ - name: "Run script set {{ workload }}" shell: | set -xe; + env {{ gate_script_path }} loop: "{{ workload }}" loop_control: @@ -33,6 +34,7 @@ CONTAINER_DISTRO_NAME: "{{ osh_params.container_distro_name | default('') }}" CONTAINER_DISTRO_VERSION: "{{ osh_params.container_distro_version | default('') }}" FEATURE_GATES: "{{ osh_params.feature_gates | default('') }}" + FEATURES: "{{ osh_params.feature_gates | default('') | regex_replace(',', ' ') }} {{ osh_params.openstack_release | default('') }} {{ osh_params.container_distro_name | default('') }}_{{ osh_params.container_distro_version | default('') }} {{ osh_params.container_distro_name | default('') }}" RUN_HELM_TESTS: "{{ run_helm_tests | default('yes') }}" # NOTE(aostapenko) using bigger than async_status timeout due to async_status issue with # not recognizing timed out jobs: https://github.com/ansible/ansible/issues/25637 diff --git a/roles/osh-run-script/tasks/main.yaml b/roles/osh-run-script/tasks/main.yaml index 844f6b359..b3ed24a7b 100644 --- a/roles/osh-run-script/tasks/main.yaml +++ b/roles/osh-run-script/tasks/main.yaml @@ -14,6 +14,7 @@ - name: "Run script {{ workload[0] }}" shell: | set -xe; + env {{ gate_script_path }} vars: gate_script_path: "{{ workload[0] }}" @@ -30,5 +31,6 @@ CONTAINER_DISTRO_NAME: "{{ osh_params.container_distro_name | default('') }}" CONTAINER_DISTRO_VERSION: "{{ osh_params.container_distro_version | default('') }}" FEATURE_GATES: "{{ osh_params.feature_gates | default('') }}" + FEATURES: "{{ osh_params.feature_gates | default('') | regex_replace(',', ' ') }} {{ osh_params.openstack_release | default('') }} {{ osh_params.container_distro_name | default('') }}_{{ osh_params.container_distro_version | default('') }} {{ osh_params.container_distro_name | default('') }}" RUN_HELM_TESTS: "{{ run_helm_tests | default('yes') }}" ... diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 3438679d8..7f142c7e5 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -70,6 +70,7 @@ required-projects: - openstack/openstack-helm - openstack/openstack-helm-infra + - openstack/openstack-helm-plugin irrelevant-files: - ^.*\.rst$ - ^doc/.*$ @@ -94,6 +95,7 @@ kubeadm: pod_network_cidr: "10.244.0.0/24" service_cidr: "10.96.0.0/16" + osh_plugin_repo: "{{ zuul.project.src_dir }}/../openstack-helm-plugin" loopback_setup: true loopback_device: /dev/loop100 loopback_image: "/opt/ext_vol/openstack-helm/ceph-loop.img"