-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathlaunch_file_generator_no_upload.yml
47 lines (41 loc) · 1.18 KB
/
launch_file_generator_no_upload.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
---
- import_playbook: playbook_launch_pre_tasks.yml
- name: Run File Generator
hosts: remote
user: core
gather_facts: False
vars:
API_ACCESS_TOKEN: "{{ LOADER_BUILD_API_ACCESS_TOKEN }}"
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 File Generator, Run File Generator
block:
- include_tasks: tasks/build_file_generator.yml
- include_tasks: tasks/run_file_generator_no_upload.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"