From 1b563ed16414ec76372aa5294d577be6bcc381e1 Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Jul 14 2022 10:25:37 +0000 Subject: [PATCH 1/3] Make testing-farm-run-test role more generic This should allow us to reuse the role for generic tests. Generic tests are often containerized and don't require specific compose and configuration. Signed-off-by: Michal Srb --- diff --git a/roles/testing-farm-run-test/tasks/main.yml b/roles/testing-farm-run-test/tasks/main.yml index 1a7b3eb..646ad6b 100644 --- a/roles/testing-farm-run-test/tasks/main.yml +++ b/roles/testing-farm-run-test/tasks/main.yml @@ -10,8 +10,13 @@ "api_key": "{{ testing_farm_zuul_ci_key.apikey }}", "test": { "{{ test_type | default('fmf') }}": { + {%- if tmt_generic -%} + "url": "{{ tmt_repo }}", + "ref": "{{ tmt_ref }}" + {% else %} "url": "{{ base_url }}/{{ zuul.project.name }}", "ref": "{{ zuul.ref }}" + {%- endif -%} } }, "environments": [{ @@ -23,6 +28,11 @@ } }, "arch": "x86_64", + {%- if tmt_generic -%} + "variables": [ + "REPO_URL": "{{ repo.url }}" + ], + {%- else -%} "os": { "compose": "{{ compose }}", }, @@ -36,6 +46,7 @@ {%- endif -%} {%- endfor -%} ] + {%- endif -%} }] } status_code: 200, 201 From bb56c4032b9f01c26b3ccb99c4f6a47563a07597 Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Jul 14 2022 10:25:37 +0000 Subject: [PATCH 2/3] debug --- diff --git a/roles/testing-farm-run-test/tasks/main.yml b/roles/testing-farm-run-test/tasks/main.yml index 646ad6b..e10b04c 100644 --- a/roles/testing-farm-run-test/tasks/main.yml +++ b/roles/testing-farm-run-test/tasks/main.yml @@ -10,6 +10,7 @@ "api_key": "{{ testing_farm_zuul_ci_key.apikey }}", "test": { "{{ test_type | default('fmf') }}": { + "test": "not-valid", {%- if tmt_generic -%} "url": "{{ tmt_repo }}", "ref": "{{ tmt_ref }}" From 6c237ae3992a92c6f578b45986a1d3a20993ca8d Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Jul 15 2022 10:06:01 +0000 Subject: [PATCH 3/3] Add one more debug task --- diff --git a/roles/testing-farm-run-test/tasks/main.yml b/roles/testing-farm-run-test/tasks/main.yml index e10b04c..774dc7b 100644 --- a/roles/testing-farm-run-test/tasks/main.yml +++ b/roles/testing-farm-run-test/tasks/main.yml @@ -58,6 +58,9 @@ - debug: msg: "Request URL: {{ api_url }}/requests/{{ id.json.id }}" +- debug: + msg: "Something" + - name: wait until the state is complete or error uri: url: "{{ api_url }}/requests/{{ id.json.id }}"