diff --git a/infrared_plugin/infrared.yaml b/infrared_plugin/main.yaml similarity index 98% rename from infrared_plugin/infrared.yaml rename to infrared_plugin/main.yaml index b207a6838..6e7be04c2 100644 --- a/infrared_plugin/infrared.yaml +++ b/infrared_plugin/main.yaml @@ -17,6 +17,7 @@ - name: "ensure '{{ tobiko_src_dir }}' directory exists" file: dest: '{{ tobiko_src_dir }}' + state: directory register: create_tobiko_src_dir diff --git a/infrared_plugin/plugin.spec b/infrared_plugin/plugin.spec index 88308f5a6..4d7a6a0c1 100644 --- a/infrared_plugin/plugin.spec +++ b/infrared_plugin/plugin.spec @@ -2,7 +2,7 @@ config: plugin_type: test - entry_point: infrared.yaml + entry_point: main.yaml subparsers: diff --git a/playbooks/infrared/pre.yaml b/playbooks/infrared/pre.yaml new file mode 100644 index 000000000..1b76cf0fc --- /dev/null +++ b/playbooks/infrared/pre.yaml @@ -0,0 +1,6 @@ +--- + +- hosts: primary + roles: + - tobiko-ensure-python3 + - tobiko-inventory diff --git a/playbooks/infrared/run.yaml b/playbooks/infrared/run.yaml index 0428485ac..377e8aa15 100644 --- a/playbooks/infrared/run.yaml +++ b/playbooks/infrared/run.yaml @@ -2,7 +2,5 @@ - hosts: primary roles: - - role: tobiko-ensure-python3 - - role: tobiko-inventory - - role: tox - - role: tobiko-check-collected-files + - tox + - tobiko-check-collected-files diff --git a/roles/tobiko-common/defaults/main.yaml b/roles/tobiko-common/defaults/main.yaml index 3ef4b2285..2bd3c5eb5 100644 --- a/roles/tobiko-common/defaults/main.yaml +++ b/roles/tobiko-common/defaults/main.yaml @@ -3,7 +3,7 @@ # --- Tobiko workflow stages test_stage: all -test_no_become: false +test_no_become: "{{ ansible_os_family in ['Darwin'] }}" test_become: '{{ not (test_no_become | bool) }}' # --- Test deploy options ----------------------------------------------------- diff --git a/zuul.d/infrared.yaml b/zuul.d/infrared.yaml index 786345804..d896fbf6f 100644 --- a/zuul.d/infrared.yaml +++ b/zuul.d/infrared.yaml @@ -7,6 +7,7 @@ timeout: 1800 description: | Run test cases using tobiko infrared plugin + pre-run: playbooks/infrared/pre.yaml run: playbooks/infrared/run.yaml vars: test_collect_dir: '{{ zuul_output_dir }}/logs' @@ -16,6 +17,7 @@ tox_environ: ANSIBLE_INVENTORY: '{{ test_inventory_file }}' zuul_output_dir: '{{ ansible_user_dir }}/zuul-output' + zuul_work_dir: "{{ zuul.project.src_dir }}" - job: