annotate tasks.py @ 6:d3caeaf39d87

deploy with invoke & skaffold
author drewp@bigasterisk.com
date Mon, 12 Dec 2022 23:16:59 -0800
parents
children 54b0edb7cca8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
1 from invoke import task
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
2 from invoke.exceptions import UnexpectedExit
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
3 @task
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
4 def delete(ctx):
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
5 ctx.run("cd 30-cert-manager; skaffold delete")
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
6 ctx.run("cd 20-kube; skaffold delete")
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
7 ctx.run("cd 10-vols; skaffold delete")
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
8 ctx.run("cd 00-defs; skaffold delete")
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
9
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
10 @task
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
11 def run(ctx):
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
12 ctx.run("cd 00-defs; skaffold run", echo=True)
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
13 ctx.run("cd 10-vols; skaffold run", echo=True)
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
14 ctx.run("cd 20-kube; skaffold run", echo=True)
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
15 # here we must wait for cert-manager-webhook.cert-manager.svc
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
16 ctx.run("cd 30-cert-manager; skaffold run", echo=True, warn=True)
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
17 ctx.run("cd 30-cert-manager; skaffold run", echo=True)
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
18
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
19 try:
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
20 ctx.run("kubectl get -n pomerium ingress | grep 80")
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
21 except UnexpectedExit:
d3caeaf39d87 deploy with invoke & skaffold
drewp@bigasterisk.com
parents:
diff changeset
22 raise SystemExit("expected cm-acme-http-solver-... ingress on port 80")