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

[kustomize_deploy] Make wait conditions optional #2578

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
6 changes: 2 additions & 4 deletions roles/kustomize_deploy/tasks/execute_step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
- stage is defined
- stage_id is defined
- stage['path'] is defined
- stage['wait_conditions'] is defined
- stage['wait_conditions'] | length > 0
- stage['values'] is defined
- stage['values'] | length > 0
- stage['build_output'] is defined
Expand Down Expand Up @@ -40,7 +38,7 @@
quiet: true
ignore_errors: true # noqa: ignore-errors
register: _builtin_wait_cond_result
loop: "{{ stage.wait_conditions }}"
loop: "{{ stage.wait_conditions | default([]) }}"

- name: Check wait_conditions validation result
when:
Expand All @@ -52,7 +50,7 @@

- name: Set stage_wait_conditions fact
ansible.builtin.set_fact:
_wait_conditions: "{{ stage.wait_conditions + _custom_conditions }}"
_wait_conditions: "{{ (stage.wait_conditions | default([])) + _custom_conditions }}"

- name: Group tasks under the same tags
vars:
Expand Down