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

This commit is contained in:
Zuul 2019-08-07 19:11:54 +00:00 committed by Gerrit Code Review
commit 0a829b6d7b
2 changed files with 8 additions and 1 deletions

View File

@ -198,6 +198,11 @@
path: '{{ zuul.project.src_dir }}/{{ rally_task }}' path: '{{ zuul.project.src_dir }}/{{ rally_task }}'
register: rally_task_file_stat 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 - name: Copy task file
become: True become: True
become_user: stack become_user: stack

View File

@ -9,7 +9,9 @@
rally_use_existing_users: false rally_use_existing_users: false
rally_existing_users_config: '{{ rally_home_dir }}/with-existing-users-config' rally_existing_users_config: '{{ rally_home_dir }}/with-existing-users-config'
rally_task_args_file: "100-percent-not-exist-file" 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: roles:
- prepare-for-rally-task - prepare-for-rally-task
- run-rally-tox - run-rally-tox