-
-
Notifications
You must be signed in to change notification settings - Fork 780
Expand file tree
/
Copy pathinstall.yaml
More file actions
129 lines (115 loc) · 3.5 KB
/
install.yaml
File metadata and controls
129 lines (115 loc) · 3.5 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
version: 1.0
description: A orquesta workflow to install packs.
input:
- packs
- register
- env
- force
- skip_dependencies
- timeout
- checkout_submodules
vars:
- packs_list: null
- dependency_list: null
- conflict_list: null
- warning_list: null
- nested: 10
- message: ""
tasks:
init_task:
action: core.noop
next:
- do: download_pack
download_pack:
action: packs.download
input:
packs: <% ctx().packs %>
force: <% ctx().force %>
dependency_list: <% ctx().dependency_list %>
checkout_submodules: <% ctx().checkout_submodules %>
next:
- when: <% succeeded() %>
do: make_a_prerun
make_a_prerun:
action: packs.virtualenv_prerun
input:
packs_status: <% task(download_pack).result.result %>
packs_list: <% ctx().packs_list %>
next:
- when: <% succeeded() and (ctx().skip_dependencies or ctx().nested = 0) %>
publish:
- packs_list: <% task(make_a_prerun).result.result %>
do: install_pack_requirements
- when: <% succeeded() and (ctx().nested > 0 and not ctx().skip_dependencies) %>
publish:
- packs_list: <% task(make_a_prerun).result.result %>
do: get_pack_dependencies
get_pack_dependencies:
action: packs.get_pack_dependencies
input:
packs_status: <% task(download_pack).result.result %>
nested: <% ctx().nested%>
next:
- when: <% succeeded() %>
publish:
- dependency_list: <% result().result.dependency_list %>
- conflict_list: <% result().result.conflict_list %>
- nested: <% result().result.nested %>
do: check_dependency_and_conflict_list
check_dependency_and_conflict_list:
action: core.noop
next:
- when: <% ctx().conflict_list %>
do: stop_installation_and_cleanup_because_conflict
- when: <% not ctx().conflict_list and ctx().dependency_list %>
do: download_pack
- when: <% not ctx().conflict_list and not ctx().dependency_list %>
do: install_pack_requirements
stop_installation_and_cleanup_because_conflict:
action: packs.delete
input:
packs: <% ctx().packs_list %>
delete_env: false
next:
- do: echo_pack_conflicts
echo_pack_conflicts:
action: core.noop
next:
- publish:
- message: >-
Unable to install packs due to conflicts. Review the
conflict_list and check the versions of corresponding installed
packs. You can also run the `st2 pack install` command with the
`--skip-dependencies` flag to skip installing dependent packs.
do: fail
install_pack_requirements:
action: packs.setup_virtualenv
input:
packs: <% ctx().packs_list %>
env: <% ctx().env %>
timeout: <% ctx().timeout %>
next:
- when: <% succeeded() %>
do: get_pack_warnings
get_pack_warnings:
action: packs.get_pack_warnings
input:
packs_status: <% task(download_pack).result.result %>
next:
- when: <% succeeded() %>
publish:
- warning_list: <% result().result.warning_list %>
do: register_pack
register_pack:
action: packs.load
input:
register: <% ctx().register %>
packs: <% ctx().packs_list %>
next:
- publish:
- message: Successfully installed packs
output:
- packs_list: <% ctx().packs_list %>
- message: <% ctx().message %>
- conflict_list: <% ctx().conflict_list %>
- warning_list: <% ctx().warning_list %>