From 32a860072a9230575cd786ca82116296eff8ced8 Mon Sep 17 00:00:00 2001 From: Andrii Ostapenko Date: Sat, 11 Jul 2020 00:35:25 -0500 Subject: [PATCH] Explicitly specify a script directory for jobs run Required to support reusing of a job in another project. Change-Id: I1c5968ea3d785c4902c7ab011f7538877b10ce24 Signed-off-by: Andrii Ostapenko --- roles/osh-run-script/tasks/main.yaml | 2 +- zuul.d/jobs.yaml | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/roles/osh-run-script/tasks/main.yaml b/roles/osh-run-script/tasks/main.yaml index 7e63ed62d..b399779cf 100644 --- a/roles/osh-run-script/tasks/main.yaml +++ b/roles/osh-run-script/tasks/main.yaml @@ -16,7 +16,7 @@ set -xe; {{ gate_script_path }} args: - chdir: "{{ zuul.project.src_dir }}" + chdir: "{{ zuul.project.src_dir }}/{{ gate_scripts_relative_path }}" environment: zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}" OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}" diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index af190461f..561464cf0 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -55,6 +55,7 @@ run: playbooks/osh-infra-gate-runner.yaml post-run: playbooks/osh-infra-collect-logs.yaml vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/multinode/019-setup-ceph-loopback-device.sh - ./tools/deployment/multinode/010-deploy-docker-registry.sh @@ -98,6 +99,7 @@ run: playbooks/osh-infra-gate-runner.yaml post-run: playbooks/osh-infra-collect-logs.yaml vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/tenant-ceph/019-setup-ceph-loopback-device.sh - ./tools/deployment/tenant-ceph/010-relabel-nodes.sh @@ -135,6 +137,7 @@ post-run: playbooks/osh-infra-collect-logs.yaml nodeset: openstack-helm-single-node vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/osh-infra-logging/000-install-packages.sh - ./tools/deployment/osh-infra-logging/019-setup-ceph-loopback-device.sh @@ -160,6 +163,7 @@ post-run: playbooks/osh-infra-collect-logs.yaml nodeset: openstack-helm-single-node vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/osh-infra-kafka/000-install-packages.sh - ./tools/deployment/osh-infra-kafka/019-setup-ceph-loopback-device.sh @@ -182,6 +186,7 @@ post-run: playbooks/osh-infra-collect-logs.yaml nodeset: openstack-helm-single-node vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/osh-infra-monitoring/000-install-packages.sh - ./tools/deployment/osh-infra-monitoring/005-deploy-k8s.sh @@ -215,6 +220,7 @@ post-run: playbooks/osh-infra-collect-logs.yaml nodeset: openstack-helm-single-node vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/federated-monitoring/000-install-packages.sh - ./tools/deployment/federated-monitoring/005-deploy-k8s.sh @@ -239,6 +245,7 @@ run: playbooks/osh-infra-gate-runner.yaml nodeset: openstack-helm-single-node vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/network-policy/000-install-packages.sh - ./tools/deployment/network-policy/005-deploy-k8s.sh @@ -275,6 +282,7 @@ container_distro_name: ubuntu container_distro_version: bionic feature_gates: apparmor + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/apparmor/000-install-packages.sh - ./tools/deployment/apparmor/019-setup-ceph-loopback-device.sh @@ -310,6 +318,7 @@ container_distro_name: ubuntu container_distro_version: bionic feature_gates: apparmor + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/osh-infra-logging/000-install-packages.sh - ./tools/deployment/osh-infra-logging/019-setup-ceph-loopback-device.sh @@ -340,6 +349,7 @@ container_distro_name: ubuntu container_distro_version: bionic feature_gates: apparmor + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/openstack-support/000-install-packages.sh - ./tools/deployment/openstack-support/019-setup-ceph-loopback-device.sh @@ -371,6 +381,7 @@ container_distro_name: ubuntu container_distro_version: bionic feature_gates: apparmor + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/common/000-install-packages.sh - ./tools/deployment/common/005-deploy-k8s.sh @@ -388,6 +399,7 @@ post-run: playbooks/osh-infra-collect-logs.yaml nodeset: openstack-helm-single-node vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/openstack-support/000-install-packages.sh - ./tools/deployment/openstack-support/019-setup-ceph-loopback-device.sh @@ -433,6 +445,7 @@ vars: kubernetes_keystone_auth: true gate_fqdn_test: true + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/keystone-auth/010-setup-client.sh - ./tools/deployment/keystone-auth/020-ingress.sh @@ -452,6 +465,7 @@ post-run: playbooks/osh-infra-collect-logs.yaml nodeset: openstack-helm-single-node vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/elastic-beats/019-setup-ceph-loopback-device.sh - ./tools/deployment/elastic-beats/005-deploy-k8s.sh @@ -481,6 +495,7 @@ - playbooks/osh-infra-collect-logs.yaml - playbooks/gather-armada-manifests.yaml vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/armada/010-armada-host-setup.sh - ./tools/deployment/armada/015-armada-build.sh @@ -503,6 +518,7 @@ - playbooks/osh-infra-collect-logs.yaml - playbooks/gather-armada-manifests.yaml vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/armada/010-armada-host-setup.sh - ./tools/deployment/armada/015-armada-build.sh @@ -526,6 +542,7 @@ - playbooks/osh-infra-collect-logs.yaml - playbooks/gather-armada-manifests.yaml vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/armada/010-armada-host-setup.sh - ./tools/deployment/armada/015-armada-build.sh @@ -542,6 +559,7 @@ - playbooks/osh-infra-upgrade-host.yaml run: playbooks/osh-infra-gate-runner.yaml vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/common/005-deploy-k8s.sh - ./tools/gate/divingbell/divingbell-tests.sh @@ -558,6 +576,7 @@ post-run: playbooks/osh-infra-collect-logs.yaml nodeset: openstack-helm-single-node vars: + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/podsecuritypolicy/000-install-packages.sh - ./tools/deployment/podsecuritypolicy/005-deploy-k8s.sh @@ -579,6 +598,7 @@ container_distro_name: ubuntu container_distro_version: bionic feature_gates: local-storage + gate_scripts_relative_path: ../openstack-helm-infra gate_scripts: - ./tools/deployment/osh-infra-local-storage/000-install-packages.sh - ./tools/deployment/osh-infra-local-storage/005-deploy-k8s.sh