Skip to content

Commit 8a04954

Browse files
committed
[Resolve 1464] Order of operations for launch
Akin to `sceptre delete`, display the order of operations when issuing `sceptre launch` for a visual representation of dependencies.
1 parent a6952c7 commit 8a04954

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

sceptre/cli/launch.py

+24
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,30 @@ def print_operations(self, prune: bool):
9090
pruner = self._make_pruner(self._context, self._make_plan)
9191
pruner.print_operations()
9292

93+
dependencies = ""
94+
for stack in deploy_plan:
95+
if stack.ignore or (stack.obsolete and not prune):
96+
dependencies += "{}Skip:\t{}{}\n".format(
97+
Fore.LIGHTWHITE_EX,
98+
stack.name,
99+
Style.RESET_ALL,
100+
)
101+
elif stack.obsolete and prune:
102+
dependencies += "{}Delete:\t{}{}\n".format(
103+
Fore.RED,
104+
stack.name,
105+
Style.RESET_ALL,
106+
)
107+
else:
108+
dependencies += "{}Deploy:\t{}{}\n".format(
109+
Fore.YELLOW,
110+
stack.name,
111+
Style.RESET_ALL,
112+
)
113+
114+
print(f"The following operations will occur, in the following order:")
115+
print(dependencies)
116+
93117
def launch(self, prune: bool) -> int:
94118
deploy_plan = self._create_deploy_plan()
95119
stacks_to_skip = self._get_stacks_to_skip(deploy_plan, prune)

0 commit comments

Comments
 (0)