@@ -35,6 +35,7 @@ const TEST_CONFIGURATIONS: { [name: string]: TestConfig } = {
35
35
"STANDARD_GKE_CLUSTER" ,
36
36
"CERT_MANAGER" ,
37
37
"GCP_MANAGED_DNS" ,
38
+ "CLUSTER_ISSUER" ,
38
39
"GENERATE_KOTS_CONFIG" ,
39
40
"INSTALL_GITPOD" ,
40
41
"CHECK_INSTALLATION" ,
@@ -49,6 +50,7 @@ const TEST_CONFIGURATIONS: { [name: string]: TestConfig } = {
49
50
PHASES : [
50
51
"STANDARD_GKE_CLUSTER" ,
51
52
"CERT_MANAGER" ,
53
+ "CLUSTER_ISSUER" ,
52
54
"GCP_MANAGED_DNS" ,
53
55
"GENERATE_KOTS_CONFIG" ,
54
56
"INSTALL_GITPOD" ,
@@ -66,11 +68,12 @@ const TEST_CONFIGURATIONS: { [name: string]: TestConfig } = {
66
68
PHASES : [
67
69
"STANDARD_K3S_CLUSTER_ON_GCP" ,
68
70
"CERT_MANAGER" ,
71
+ "CLUSTER_ISSUER" ,
69
72
"GENERATE_KOTS_CONFIG" ,
70
73
"INSTALL_GITPOD" ,
74
+ "RESULTS" ,
71
75
"CHECK_INSTALLATION" ,
72
76
"RUN_INTEGRATION_TESTS" ,
73
- "RESULTS" ,
74
77
"DESTROY" ,
75
78
] ,
76
79
} ,
@@ -80,6 +83,7 @@ const TEST_CONFIGURATIONS: { [name: string]: TestConfig } = {
80
83
PHASES : [
81
84
"STANDARD_K3S_CLUSTER_ON_GCP" ,
82
85
"CERT_MANAGER" ,
86
+ "CLUSTER_ISSUER" ,
83
87
"GENERATE_KOTS_CONFIG" ,
84
88
"INSTALL_GITPOD" ,
85
89
"CHECK_INSTALLATION" ,
@@ -92,8 +96,8 @@ const TEST_CONFIGURATIONS: { [name: string]: TestConfig } = {
92
96
PHASES : [
93
97
"STANDARD_AKS_CLUSTER" ,
94
98
"CERT_MANAGER" ,
95
- "AZURE_ISSUER " ,
96
- "AZURE_EXTERNALDNS " ,
99
+ "CLUSTER_ISSUER " ,
100
+ "EXTERNALDNS " ,
97
101
"ADD_NS_RECORD" ,
98
102
"GENERATE_KOTS_CONFIG" ,
99
103
"INSTALL_GITPOD" ,
@@ -103,6 +107,23 @@ const TEST_CONFIGURATIONS: { [name: string]: TestConfig } = {
103
107
"DESTROY" ,
104
108
] ,
105
109
} ,
110
+ STANDARD_EKS_TEST : {
111
+ CLOUD : "aws" ,
112
+ DESCRIPTION : "Create an EKS cluster" ,
113
+ PHASES : [
114
+ "STANDARD_EKS_CLUSTER" ,
115
+ "CERT_MANAGER" ,
116
+ "EXTERNALDNS" ,
117
+ "CLUSTER_ISSUER" ,
118
+ "ADD_NS_RECORD" ,
119
+ "GENERATE_KOTS_CONFIG" ,
120
+ "RESULTS" ,
121
+ "INSTALL_GITPOD" ,
122
+ "CHECK_INSTALLATION" ,
123
+ "RUN_INTEGRATION_TESTS" ,
124
+ "DESTROY" ,
125
+ ] ,
126
+ } ,
106
127
} ;
107
128
108
129
const config : TestConfig = TEST_CONFIGURATIONS [ testConfig ] ;
@@ -128,6 +149,11 @@ const INFRA_PHASES: { [name: string]: InfraConfig } = {
128
149
makeTarget : "aks-standard-cluster" ,
129
150
description : "Creating an aks cluster(azure)" ,
130
151
} ,
152
+ STANDARD_EKS_CLUSTER : {
153
+ phase : "create-std-eks-cluster" ,
154
+ makeTarget : "eks-standard-cluster" ,
155
+ description : "Creating a EKS cluster with 1 nodepool each for workspace and server" ,
156
+ } ,
131
157
CERT_MANAGER : {
132
158
phase : "setup-cert-manager" ,
133
159
makeTarget : "cert-manager" ,
@@ -146,19 +172,19 @@ const INFRA_PHASES: { [name: string]: InfraConfig } = {
146
172
) } db=${ randomize ( "db" , cloud ) } `,
147
173
description : `Generate KOTS Config file` ,
148
174
} ,
149
- AZURE_ISSUER : {
150
- phase : "setup-azure- cluster-issuer" ,
151
- makeTarget : "azure -issuer" ,
152
- description : " Deploys ClusterIssuer for azure" ,
175
+ CLUSTER_ISSUER : {
176
+ phase : "setup-cluster-issuer" ,
177
+ makeTarget : `cluster -issuer cloud= ${ cloud } ` ,
178
+ description : ` Deploys ClusterIssuer for ${ cloud } ` ,
153
179
} ,
154
- AZURE_EXTERNALDNS : {
155
- phase : "azure- external-dns" ,
156
- makeTarget : "azure- external-dns" ,
157
- description : " Deploys external-dns with azure provider" ,
180
+ EXTERNALDNS : {
181
+ phase : "external-dns" ,
182
+ makeTarget : ` external-dns cloud= ${ cloud } ` ,
183
+ description : ` Deploys external-dns with ${ cloud } provider` ,
158
184
} ,
159
185
ADD_NS_RECORD : {
160
186
phase : "add-ns-record" ,
161
- makeTarget : " add-ns-record" ,
187
+ makeTarget : ` add-ns-record cloud= ${ cloud } ` ,
162
188
description : "Adds NS record for subdomain under gitpod-self-hosted.com" ,
163
189
} ,
164
190
INSTALL_GITPOD_IGNORE_PREFLIGHTS : {
@@ -189,7 +215,7 @@ const INFRA_PHASES: { [name: string]: InfraConfig } = {
189
215
} ,
190
216
DESTROY : {
191
217
phase : "destroy" ,
192
- makeTarget : " cleanup" ,
218
+ makeTarget : ` cleanup cloud= ${ cloud } ` ,
193
219
description : "Destroy the created infrastucture" ,
194
220
} ,
195
221
RESULTS : {
@@ -224,23 +250,24 @@ export async function installerTests(config: TestConfig) {
224
250
}
225
251
226
252
function callMakeTargets ( phase : string , description : string , makeTarget : string ) {
227
- werft . phase ( phase , `${ description } ` ) ;
228
- werft . log ( phase , `calling ${ makeTarget } ` ) ;
253
+ werft . phase ( phase , description ) ;
229
254
230
255
const response = exec ( `make -C ${ makefilePath } ${ makeTarget } ` , {
231
- slice : "call-make-target" ,
256
+ slice : phase ,
232
257
dontCheckRc : true ,
233
258
} ) ;
234
259
235
260
if ( response . code ) {
236
261
console . error ( `Error: ${ response . stderr } ` ) ;
237
262
werft . fail ( phase , "Operation failed" ) ;
238
- } else {
239
- werft . log ( phase , response . stdout . toString ( ) ) ;
240
- werft . done ( phase ) ;
263
+ return response . code ;
241
264
}
242
265
266
+ werft . log ( phase , response . stdout . toString ( ) ) ;
267
+ werft . done ( phase ) ;
268
+
243
269
return response . code ;
270
+
244
271
}
245
272
246
273
function randomize ( resource : string , platform : string ) : string {
@@ -254,7 +281,10 @@ function cleanup() {
254
281
const phase = "destroy-infrastructure" ;
255
282
werft . phase ( phase , "Destroying all the created resources" ) ;
256
283
257
- const response = exec ( `make -C ${ makefilePath } cleanup` , { slice : "run-terrafrom-destroy" , dontCheckRc : true } ) ;
284
+ const response = exec ( `make -C ${ makefilePath } cleanup cloud=${ cloud } ` , {
285
+ slice : "run-terrafrom-destroy" ,
286
+ dontCheckRc : true ,
287
+ } ) ;
258
288
259
289
// if the destroy command fail, we check if any resources are pending to be removed
260
290
// if nothing is yet to be cleaned, we return with success
0 commit comments