-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
138 lines (115 loc) · 4.19 KB
/
Makefile
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
130
131
132
133
134
135
136
137
138
# ===========================
# Default: help section
# ===========================
info: intro commands
intro:
@echo ""
@echo "KubeToolbox by Enrise"
# ===========================
# Main commands
# ===========================
build: intro do-build-amazon do-build-azure do-build-google build-digital-ocean
build-amazon: intro do-build-amazon
build-azure: intro do-build-azure
build-google: intro do-build-google
build-digital-ocean: intro do-build-digital-ocean
test: intro do-test-amazon do-test-azure do-test-google test-digital-ocean
test-amazon: intro do-test-amazon
test-azure: intro do-test-azure
test-google: intro do-test-google
test-digital-ocean: intro do-test-digital-ocean
push: intro do-push-amazon do-push-azure do-push-google push-digital-ocean
push-amazon: intro do-push-amazon
push-azure: intro do-push-azure
push-google: intro do-push-google
push-digital-ocean: intro do-push-digital-ocean
amazon: intro do-build-amazon do-test-amazon
azure: intro do-build-azure do-test-azure
google: intro do-build-google do-test-google
digital-ocean: intro do-build-digital-ocean do-test-digital-ocean
# ===========================
# Comon recipes
# ===========================
commands:
@echo ""
@echo "=== Makefile commands ==="
@echo ""
@echo "Project commands:"
@echo " build Builds the containers."
@echo " test Tests the containers."
@echo " push Pushes the containers to the registry."
# Build commands
do-build-amazon:
@echo ""
@echo "=== Build Amazon Kubernetes toolbox ==="
@echo ""
docker build -t enrise/kube-toolbox:amazon ./Amazon
do-build-azure:
@echo ""
@echo "=== Build Azure Kubernetes toolbox ==="
@echo ""
docker build -t enrise/kube-toolbox:azure ./Azure
do-build-google:
@echo ""
@echo "=== Build Google Kubernetes toolbox ==="
@echo ""
docker build -t enrise/kube-toolbox:google ./Google
do-build-digital-ocean:
@echo ""
@echo "=== Build Digital Ocean Kubernetes toolbox ==="
@echo ""
docker build -t enrise/kube-toolbox:digital-ocean ./DigitalOcean
# Test commands
do-test-amazon:
@echo ""
@echo "=== Test Amazon Kubernetes toolbox ==="
@echo ""
docker run --rm enrise/kube-toolbox:amazon connect-kubernetes | grep Usage
docker run --rm enrise/kube-toolbox:amazon helm version 2>&1 | grep version.BuildInfo
docker run --rm enrise/kube-toolbox:amazon kubectl version 2>&1 | grep "Client Version"
docker run --rm enrise/kube-toolbox:amazon aws --version | grep aws-cli
do-test-azure:
@echo ""
@echo "=== Test Azure Kubernetes toolbox ==="
@echo ""
docker run --rm enrise/kube-toolbox:azure connect-kubernetes | grep Usage
docker run --rm enrise/kube-toolbox:azure helm version 2>&1 | grep version.BuildInfo
docker run --rm enrise/kube-toolbox:azure kubectl version 2>&1 | grep "Client Version"
docker run --rm enrise/kube-toolbox:azure az --version | grep azure-cli
do-test-google:
@echo ""
@echo "=== Test Google Kubernetes toolbox ==="
@echo ""
docker run --rm enrise/kube-toolbox:google connect-kubernetes | grep Usage
docker run --rm enrise/kube-toolbox:google helm version 2>&1 | grep version.BuildInfo
docker run --rm enrise/kube-toolbox:google kubectl version 2>&1 | grep "Client Version"
docker run --rm enrise/kube-toolbox:google gcloud --version 2>&1 | grep "Google Cloud SDK"
do-test-digital-ocean:
@echo ""
@echo "=== Test Digital Ocean Kubernetes toolbox ==="
@echo ""
docker run --rm enrise/kube-toolbox:digital-ocean connect-kubernetes | grep Usage
docker run --rm enrise/kube-toolbox:digital-ocean helm version 2>&1 | grep version.BuildInfo
docker run --rm enrise/kube-toolbox:digital-ocean kubectl version 2>&1 | grep "Client Version"
docker run --rm enrise/kube-toolbox:digital-ocean doctl version 2>&1 | grep "doctl version"
# Push commands
do-push-amazon:
@echo ""
@echo "=== Push Amazon Kubernetes toolbox ==="
@echo ""
docker push enrise/kube-toolbox:amazon
do-push-azure:
@echo ""
@echo "=== Push Azure Kubernetes toolbox ==="
@echo ""
docker push enrise/kube-toolbox:azure
do-push-google:
@echo ""
@echo "=== Push Google Kubernetes toolbox ==="
@echo ""
docker push enrise/kube-toolbox:google
do-push-digital-ocean:
@echo ""
@echo "=== Push Google Kubernetes toolbox ==="
@echo ""
docker push enrise/kube-toolbox:digital-ocean