charts/roles/run-script/tasks/main.yaml
astebenkova 3de3ca9ef8 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
2021-01-21 09:09:42 +02:00

23 lines
844 B
YAML

# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
- name: "Run script {{ script }}"
shell: |
set -xe;
{{ script_path }}
vars:
script_path: "{{ script }}"
args:
chdir: "{{ zuul.project.src_dir }}/{{ gate_scripts_relative_path | default('') }}"
environment:
FEATURE_GATES: "{{ aio_params.feature_gates | default('') }}"