-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlaunch_ui.yml
44 lines (39 loc) · 1.05 KB
/
launch_ui.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
- import_playbook: playbook_launch_pre_tasks.yml
- name: Run UI
hosts: remote
user: core
gather_facts: False
vars_files:
- "environments/{{ env }}/main.yml" # ENV must always be loaded first
- "environments/shared_secrets.yml"
- "environments/shared_variables.yml"
tasks:
- name: Login to Docker
block:
- include_tasks: tasks/docker_login.yml
- set_fact:
failed_flag: "passed"
rescue:
- debug:
msg: "Failed execute docker login."
- set_fact:
failed_flag: "failed"
- name: Build UI, Run UI
block:
- include_tasks: tasks/build_ui.yml
- include_tasks: tasks/start_ui.yml
- set_fact:
failed_flag: "passed"
rescue:
- debug:
msg: "Error Detected Failing Build"
- set_fact:
failed_flag: "failed"
- name: Check Failures
hosts: remote
gather_facts: False
tasks:
- fail:
msg: "The execution has failed because of errors."
when: failed_flag == "failed"