Fix the way we handle validation cli command in CI role

Change-Id: If214d99be7a2ce616f0f99700165f482d3847f79
This commit is contained in:
matbu 2021-06-24 11:33:32 +02:00
parent 36a2a11205
commit 5d0dc7a7eb
3 changed files with 16 additions and 10 deletions

View File

@ -14,5 +14,5 @@ validation_component: "{{ job.component|default('validation') }}"
# The openstack command needs to install python-tripleoclient and its
# dependencies first. This value should be override as needed in the roles/vars
# calls.
command: "validation"
cli_command: "validation"
run_validation: true

View File

@ -16,8 +16,10 @@
- name: Set commmand if virtualenv exists
set_fact:
validation_command: "source {{ zuul_work_virtualenv }}/bin/activate; validation"
when: is_virtualenv.stat.exists
validation_command: "source {{ zuul_work_virtualenv }}/bin/activate; {{ cli_command }}"
when:
- is_virtualenv.stat.exists
- validation_command is not defined
- name: Set Validation directory if virtualenv exists
set_fact:
@ -31,8 +33,10 @@
- name: Set commmand without virtualenv
set_fact:
validation_command: "validation"
when: not is_virtualenv.stat.exists
validation_command: "{{ cli_command }}"
when:
- not is_virtualenv.stat.exists
- validation_command is not defined
- name: Set validation dir without virtualenv
set_fact:

View File

@ -1,27 +1,29 @@
---
# extra_env_vars variable should be formed as:
# extra_env_vars: "--extra-env-vars key=value --extra-env-vars key2=value2"
validations_list:
compute:
- nova-status:
extra_args: ""
extra_env_args: ""
extra_env_args: "{{ extra_env_vars | default('') }}"
network:
- undercloud-neutron-sanity-check:
extra_args: ""
extra_env_args: ""
extra_env_args: "{{ extra_env_vars | default('') }}"
validation:
- check-cpu:
extra_args: "--extra-vars minimal_cpu_count=2"
extra_env_args: "--extra-env-vars ANSIBLE_STDOUT_CALLBACK=default"
extra_env_args: "--extra-env-vars ANSIBLE_STDOUT_CALLBACK=default {{ extra_env_vars | default('') }}"
- 512e:
extra_args: ""
extra_env_args: ""
- check-ram:
extra_args: "--extra-vars minimal_ram_gb=2"
extra_env_args: "--extra-env-vars ANSIBLE_STDOUT_CALLBACK=default"
extra_env_args: "--extra-env-vars ANSIBLE_STDOUT_CALLBACK=default {{ extra_env_vars | default('') }}"
tripleo:
- undercloud-process-count:
extra_args: ""
extra_env_args: ""
extra_env_args: "{{ extra_env_vars | default('') }}"
validations_group:
compute:
- compute