Browse Source

Merge "[ci] Fail gracefuly in case of wrong path for task file"

master
Zuul 1 month ago
parent
commit
0a829b6d7b

+ 5
- 0
tests/ci/playbooks/roles/prepare-for-rally-task/tasks/main.yaml View File

@@ -198,6 +198,11 @@
198 198
     path: '{{ zuul.project.src_dir }}/{{ rally_task }}'
199 199
   register: rally_task_file_stat
200 200
 
201
+- name: Fail if Rally task file is missed.
202
+  fail:
203
+    msg: "'{{ rally_task }}' Rally task file is missed."
204
+  when: rally_task_file_stat.stat.exists != True
205
+
201 206
 - name: Copy task file
202 207
   become: True
203 208
   become_user: stack

+ 3
- 1
tests/ci/playbooks/run-rally-tox.yaml View File

@@ -9,7 +9,9 @@
9 9
     rally_use_existing_users: false
10 10
     rally_existing_users_config: '{{ rally_home_dir }}/with-existing-users-config'
11 11
     rally_task_args_file: "100-percent-not-exist-file"
12
-    rally_task: "100-percent-not-exist-file"
12
+    # this task will not be launched, but we need to specify something real to
13
+    # pass a check at 'prepare-for-rally-task' role.
14
+    rally_task: "rally-jobs/simple-job.yaml"
13 15
   roles:
14 16
     - prepare-for-rally-task
15 17
     - run-rally-tox

Loading…
Cancel
Save