-
Notifications
You must be signed in to change notification settings - Fork 0
/
goal.yaml
57 lines (55 loc) · 1.21 KB
/
goal.yaml
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
# This example combines two `goal` features:
# 1. Environmental executions: `goal run apply --on dev`
# 2. Built-in `kubectl_context` assertions upon execution
# to prevent accidental runs on wrong environment.
#
# NOTE: list your contexts with `kubectl config get-contexts`
#
# Usage:
# goal run pods --on dev
# goal run pods --on stage
#
# goal run apply --on dev
# goal run apply --on stage
pods:
envs:
dev:
desc: Kubectl get app pods on dev
cmd: kubectl
args:
- get
- pods
- -l
- app=nginx
assert:
- kubectl_context: gke_project_region_dev
stage:
desc: Kubectl get app pods on stage
cmd: kubectl
args:
- get
- pods
- -l
- app=nginx
assert:
- kubectl_context: gke_project_region_stage
apply:
envs:
dev:
desc: Kubectl apply on dev
cmd: kubectl
args:
- apply
- -f
- deployment.yaml
assert:
- kubectl_context: gke_project_region_dev
stage:
desc: Kubectl apply on stage
cmd: kubectl
args:
- apply
- -f
- deployment.yaml
assert:
- kubectl_context: gke_project_region_stage