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

Change-Id: I942667988e2cd76a599ffb3d9773a757c6a512df
This commit is contained in:
Andrey Kurilin 2019-07-30 22:51:23 +03:00
parent b6838c8ed9
commit 432d11e19d
2 changed files with 8 additions and 1 deletions

View File

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

View File

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