817efe966c
Pass parameter from job allowing to parallelize helm tests using separate scripts. Change-Id: I3e06c5590d51c75448dc5ff5978dc7fc90daca6f Signed-off-by: Andrii Ostapenko <andrii.ostapenko@att.com>
57 lines
2.4 KiB
YAML
57 lines
2.4 KiB
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.
|
|
|
|
---
|
|
- block:
|
|
- name: "Run script set {{ workload }}"
|
|
shell: |
|
|
set -xe;
|
|
{{ gate_script_path }}
|
|
loop: "{{ workload }}"
|
|
loop_control:
|
|
loop_var: gate_script_path
|
|
pause: 5
|
|
args:
|
|
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('') }}"
|
|
OSH_PATH: "{{ zuul_osh_relative_path | default('../openstack-helm/') }}"
|
|
OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('../openstack-helm-infra/') }}"
|
|
OPENSTACK_RELEASE: "{{ osh_params.openstack_release | default('') }}"
|
|
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('') }}"
|
|
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
|
|
async: 3600
|
|
poll: 0
|
|
register: async_results
|
|
|
|
- name: Wait for script set to finish
|
|
async_status:
|
|
jid: '{{ item.ansible_job_id }}'
|
|
register: jobs
|
|
until: jobs.finished
|
|
delay: 5
|
|
retries: 360
|
|
loop: "{{ async_results.results }}"
|
|
|
|
always:
|
|
- name: Print script set output
|
|
shell: |
|
|
# NOTE(aostapenko) safely retrieving items for the unlikely case if jobs timed out in async_status
|
|
echo 'STDOUT:\n{{ item.get("stdout") | regex_replace("\'", "") }}\nSTDERR:\n{{ item.get("stderr") | regex_replace("\'", "") }}'
|
|
loop: "{{ jobs.results }}"
|
|
...
|