Skip to content

Commit

Permalink
Accommodation for none-Kube sites
Browse files Browse the repository at this point in the history
  • Loading branch information
ssorj committed Dec 30, 2023
1 parent 9a89391 commit f8a35c2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions python/skewer/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ def run_steps_minikube(skewer_file, debug=False):
skewer_data = read_yaml(skewer_file)
kubeconfigs = list()

for site in skewer_data["sites"]:
for site in skewer_data["sites"].values():
if site.get("platform", "kubernetes") != "kubernetes":
continue

kubeconfigs.append(make_temp_file())

try:
Expand Down Expand Up @@ -185,7 +188,6 @@ def run_steps(skewer_file, *kubeconfigs, debug=False):
_run_step(work_dir, skewer_data, step, check=False)
break


def _pause_for_demo(work_dir, skewer_data):
first_site_name, first_site_data = list(skewer_data["sites"].items())[0]
first_site_kubeconfig = first_site_data["kubeconfig"].replace("~", work_dir)
Expand Down Expand Up @@ -382,8 +384,12 @@ def _generate_readme_step(skewer_data, step_data):

for i, item in enumerate(items):
site_name, commands = item
namespace = skewer_data["sites"][site_name]["namespace"]
namespace = skewer_data["sites"][site_name].get("namespace")
title = skewer_data["sites"][site_name].get("title", namespace)

if title is None:
fail(f"Site '{site_name}' has no namespace or title")

outputs = list()

out.append(f"_**Console for {title}:**_")
Expand Down

0 comments on commit f8a35c2

Please sign in to comment.