-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
downstream-ee/aws: call runme.sh from within the container (#1510)
downstream-ee/aws: call runme.sh from within the container Depends-On: ansible-collections/amazon.aws#797
- Loading branch information
Showing
6 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,27 @@ | ||
--- | ||
- hosts: controller | ||
gather_facts: false | ||
vars: | ||
target_name: "{{ downstream_ee_testing_targets[0] }}" | ||
tasks: | ||
- command: "ansible-navigator run --eei brew.registry.redhat.io/{{ downstream_ee_image }} site.yaml --mode=stdout --pull-policy=never" | ||
args: | ||
chdir: "~/{{ zuul.projects[ansible_collections_repo].src_dir }}/tests/integration/targets" | ||
- name: Test if runne.sh exists | ||
stat: | ||
path: "~/{{ zuul.projects[ansible_collections_repo].src_dir }}/tests/integration/targets/{{ target_name }}/runme.sh" | ||
register: runme_sh_stat | ||
|
||
- when: runme_sh_stat.stat.exists | ||
block: | ||
- name: Run the target with ./runme.sh | ||
command: "ansible-navigator exec --eei brew.registry.redhat.io/{{ downstream_ee_image }} --mode=stdout --pull-policy=never -- bash -c 'ls && cd {{ target_name }} && ./runme.sh' && echo runme.sh_success " | ||
args: | ||
chdir: "~/{{ zuul.projects[ansible_collections_repo].src_dir }}/tests/integration/targets" | ||
register: runme_output | ||
# See: https://github.com/ansible/ansible-navigator/issues/1215 | ||
- name: Evaluate if the runme.sh was a success | ||
assert: | ||
that: | ||
- '"runme.sh_success" in runme_output.stdout' | ||
|
||
- when: not runme_sh_stat.stat.exists | ||
name: Run the target with site.yaml | ||
command: "ansible-navigator run --eei brew.registry.redhat.io/{{ downstream_ee_image }} site.yaml --mode=stdout --pull-policy=never" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters