Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unset resources section in workflows #2661

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions roles/test_operator/tasks/tempest-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,3 +173,28 @@
test_operator_cr |
combine({'spec': {'workflow': overriden_workflow}}, recursive=true)
}}

- name: Make sure resources are not set for worklfow step
when:
- not cifmw_test_operator_dry_run | bool
- stage_vars_dict.cifmw_test_operator_tempest_workflow | list | length > 0
block:
- name: Remove resources until fix for bug 2088074 reaches openstack-tempest-all image
when: item.resources is undefined
vars:
_no_resources_workflow_step: >-
{{
item |
combine({"resources": {"requests": {}, "limits": {}}}, recursive=true)
}}
ansible.builtin.set_fact:
no_resources_workflow: "{{ no_resources_workflow | default([]) + [_no_resources_workflow_step] }}"
loop: "{{ stage_vars_dict.cifmw_test_operator_tempest_workflow | list }}"

- name: Override the Tempest CR workflow
ansible.builtin.set_fact:
test_operator_cr: >-
{{
test_operator_cr |
combine({'spec': {'workflow': no_resources_workflow}}, recursive=true)
}}
Loading