From 3de3ca9ef852cbd9cdd8380fc6ea870087838283 Mon Sep 17 00:00:00 2001 From: astebenkova Date: Wed, 20 Jan 2021 13:31:45 +0200 Subject: [PATCH] Improve the possibility to inherit zuul jobs So far it takes some effort and workaround to inherit zuul jobs, airship-jarvis, in particular. Gate scripts are running from the directory different from the opendev.org/airship/charts when inheriting. Thus, adding a single variable (gate_scripts_relative_path) that is responsible for setting a directory for the gate scripts should solve the issue and improve the inheritance. Change-Id: Icc06211a8d5a0814f5e902ebee97d440d3d2943a --- roles/gather-logs/tasks/main.yaml | 2 +- roles/run-script/tasks/main.yaml | 2 +- zuul.d/jobs.yaml | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/roles/gather-logs/tasks/main.yaml b/roles/gather-logs/tasks/main.yaml index 40341fbe..45a8a11e 100644 --- a/roles/gather-logs/tasks/main.yaml +++ b/roles/gather-logs/tasks/main.yaml @@ -16,7 +16,7 @@ environment: LOGDIR: "{{ logs_dir }}" args: - chdir: "{{ zuul.project.src_dir }}" + chdir: "{{ zuul.project.src_dir }}/{{ gate_scripts_relative_path | default('') }}" - name: Upload the logs synchronize: diff --git a/roles/run-script/tasks/main.yaml b/roles/run-script/tasks/main.yaml index ffd2b7bc..be18936e 100644 --- a/roles/run-script/tasks/main.yaml +++ b/roles/run-script/tasks/main.yaml @@ -17,6 +17,6 @@ vars: script_path: "{{ script }}" args: - chdir: "{{ zuul.project.src_dir }}" + chdir: "{{ zuul.project.src_dir }}/{{ gate_scripts_relative_path | default('') }}" environment: FEATURE_GATES: "{{ aio_params.feature_gates | default('') }}" diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 791695a6..348145da 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -29,6 +29,7 @@ aio_params: feature_gates: "" collect_kubernetes_logs_namespace: tekton-pipelines + gate_scripts_relative_path: ../charts gate_scripts: - ./tools/gate/jarvis/050-setup-development-ca.sh - ./tools/gate/jarvis/100-deploy-k8s.sh @@ -54,6 +55,7 @@ aio_params: feature_gates: "" collect_kubernetes_logs_namespace: tekton-pipelines + gate_scripts_relative_path: ../charts gate_scripts: - ./tools/gate/jarvis/050-setup-development-ca.sh - ./tools/gate/jarvis/100-deploy-k8s.sh