-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlaunch_infinispan.yml
56 lines (50 loc) · 1.43 KB
/
launch_infinispan.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
45
46
47
48
49
50
51
52
53
54
55
56
---
- import_playbook: playbook_launch_pre_tasks.yml
- name: Run Infinispan
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: Run Infinispan with preloaded data
block:
- include_tasks: tasks/start_infinispan_data.yml
- set_fact:
failed_flag: "passed"
rescue:
- debug:
msg: "Error Detected Failing Build"
- set_fact:
failed_flag: "failed"
when: DOWNLOAD_INFINISPAN_DATA_IMAGE_FROM_AWS
- name: Run Infinispan env
block:
- include_tasks: tasks/start_infinispan_env.yml
- set_fact:
failed_flag: "passed"
rescue:
- debug:
msg: "Error Detected Failing Build"
- set_fact:
failed_flag: "failed"
when: not DOWNLOAD_INFINISPAN_DATA_IMAGE_FROM_AWS
- name: Check Failures
hosts: remote
gather_facts: False
tasks:
- fail:
msg: "The execution has failed because of errors."
when: failed_flag == "failed"