Skip to content

Commit d4a3093

Browse files
author
Niraj Acharya
committed
enable k8s test pipeline
1 parent 62f4548 commit d4a3093

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

.drone.star

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ config = {
100100
"apiLocks",
101101
],
102102
"skip": False,
103-
"k8s": False,
103+
"k8s": True,
104104
},
105105
"settingsAndNotification": {
106106
"suites": [
@@ -130,21 +130,21 @@ config = {
130130
],
131131
"skip": False,
132132
"withRemotePhp": [False],
133-
"k8s": False,
133+
"k8s": True,
134134
},
135135
"spaces": {
136136
"suites": [
137137
"apiSpaces",
138138
],
139139
"skip": False,
140-
"k8s": False,
140+
"k8s": True,
141141
},
142142
"spacesShares": {
143143
"suites": [
144144
"apiSpacesShares",
145145
],
146146
"skip": False,
147-
"k8s": False,
147+
"k8s": True,
148148
},
149149
"davOperations": {
150150
"suites": [
@@ -184,14 +184,14 @@ config = {
184184
],
185185
"skip": False,
186186
"withRemotePhp": [False],
187-
"k8s": False,
187+
"k8s": True,
188188
},
189189
"sharingNgAdditionalShareRole": {
190190
"suites": [
191191
"apiSharingNgAdditionalShareRole",
192192
],
193193
"skip": False,
194-
"k8s": False,
194+
"k8s": True,
195195
"withRemotePhp": [False],
196196
},
197197
"sharingNgShareInvitation": {
@@ -307,7 +307,7 @@ config = {
307307
"coreApiShareManagementToShares",
308308
],
309309
"skip": False,
310-
"k8s": False,
310+
"k8s": True,
311311
"withRemotePhp": [False],
312312
},
313313
"3": {
@@ -328,7 +328,7 @@ config = {
328328
"coreApiShareUpdateToShares",
329329
],
330330
"skip": False,
331-
"k8s": False,
331+
"k8s": True,
332332
"withRemotePhp": [False],
333333
},
334334
"5": {
@@ -339,7 +339,7 @@ config = {
339339
"coreApiWebdavEtagPropagation2",
340340
],
341341
"skip": False,
342-
"k8s": False,
342+
"k8s": True,
343343
},
344344
"6": {
345345
"suites": [
@@ -354,7 +354,7 @@ config = {
354354
"coreApiWebdavProperties",
355355
],
356356
"skip": False,
357-
"k8s": False,
357+
"k8s": True,
358358
},
359359
"8": {
360360
"suites": [
@@ -1091,7 +1091,7 @@ def localApiTestPipeline(ctx):
10911091
params[item] = matrix[item] if item in matrix else defaults[item]
10921092
for storage in params["storages"]:
10931093
for run_with_remote_php in params["withRemotePhp"]:
1094-
run_on_k8s = params["k8s"] and ctx.build.event == "cron"
1094+
run_on_k8s = params["k8s"] #and ctx.build.event == "cron"
10951095
ocis_url = OCIS_URL
10961096
if run_on_k8s:
10971097
ocis_url = "https://%s" % OCIS_SERVER_NAME
@@ -1108,7 +1108,7 @@ def localApiTestPipeline(ctx):
11081108
([] if run_on_k8s else restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin")) +
11091109
(tikaService() if params["tikaNeeded"] and not run_on_k8s else tikaServiceK8s() if params["tikaNeeded"] and run_on_k8s else []) +
11101110
(waitForServices("online-offices", ["collabora:9980", "onlyoffice:443", "fakeoffice:8080"]) if params["collaborationServiceNeeded"] else []) +
1111-
(waitK3sCluster() + (clamavServiceK8s() if params["antivirusNeeded"] and run_on_k8s else []) + (emailServiceK8s() if params["emailNeeded"] and run_on_k8s else []) + deployOcis() + waitForOcis(ocis_url = ocis_url) + ociswrapper() + waitForOciswrapper() if run_on_k8s else ocisServer(storage, extra_server_environment = params["extraServerEnvironment"], with_wrapper = True, tika_enabled = params["tikaNeeded"], volumes = ([stepVolumeOcisStorage]))) +
1111+
(waitK3sCluster() + (clamavServiceK8s() if params["antivirusNeeded"] and run_on_k8s else []) + (emailServiceK8s() if params["emailNeeded"] and run_on_k8s else []) + deployOcis() + waitForOcis(ocis_url = ocis_url, timeout = 600) + ociswrapper() + waitForOciswrapper() if run_on_k8s else ocisServer(storage, extra_server_environment = params["extraServerEnvironment"], with_wrapper = True, tika_enabled = params["tikaNeeded"], volumes = ([stepVolumeOcisStorage]))) +
11121112
(waitForClamavService() if params["antivirusNeeded"] and not run_on_k8s else exposeAntivirusServiceK8s() if params["antivirusNeeded"] and run_on_k8s else []) +
11131113
(waitForEmailService() if params["emailNeeded"] and not run_on_k8s else exposeEmailServiceK8s() if params["emailNeeded"] and run_on_k8s else []) +
11141114
(ocisServer(storage, deploy_type = "federation", extra_server_environment = params["extraServerEnvironment"]) if params["federationServer"] else []) +
@@ -1393,7 +1393,7 @@ def coreApiTestPipeline(ctx):
13931393
for run_with_remote_php in params["withRemotePhp"]:
13941394
filter_tags = "~@skipOnGraph&&~@skipOnOcis-%s-Storage" % ("OC" if storage == "owncloud" else "OCIS")
13951395
expected_failures_file = "%s/expected-failures-API-on-%s-storage.md" % (test_dir, storage.upper())
1396-
run_on_k8s = params["k8s"] and ctx.build.event == "cron"
1396+
run_on_k8s = params["k8s"] #and ctx.build.event == "cron"
13971397
ocis_url = OCIS_URL
13981398
if run_on_k8s:
13991399
ocis_url = "https://%s" % OCIS_SERVER_NAME
@@ -3608,13 +3608,13 @@ def k6LoadTests(ctx):
36083608
},
36093609
}]
36103610

3611-
def waitForOcis(name = "ocis", ocis_url = OCIS_URL, depends_on = []):
3611+
def waitForOcis(name = "ocis", ocis_url = OCIS_URL, depends_on = [], timeout = 300):
36123612
return [{
36133613
"name": "wait-for-%s" % name,
36143614
"image": OC_CI_ALPINE,
36153615
"commands": [
36163616
# wait for ocis-server to be ready (5 minutes)
3617-
"timeout 300 bash -c 'while [ $(curl -sk -uadmin:admin " +
3617+
"timeout %s bash -c 'while [ $(curl -sk -uadmin:admin " % timeout +
36183618
"%s/graph/v1.0/users/admin " % ocis_url +
36193619
"-w %{http_code} -o /dev/null) != 200 ]; do sleep 1; done'",
36203620
],
@@ -3826,6 +3826,7 @@ def deployOcis():
38263826
"sed -i '/- name: IDM_ADMIN_PASSWORD/a\\\\\\n value: \"admin\"' ./charts/ocis/templates/idm/deployment.yaml",
38273827
"sed -i '/- name: PROXY_HTTP_ADDR/i\\\\ - name: PROXY_ENABLE_BASIC_AUTH\\\n value: \"true\"' ./charts/ocis/templates/proxy/deployment.yaml",
38283828
"export KUBECONFIG=%s/kubeconfig-$${DRONE_BUILD_NUMBER}.yaml" % dirs["base"],
3829+
"sed -i 's/--timeout 5m0s/--timeout 10m0s/' Makefile",
38293830
"make helm-install-atomic",
38303831
],
38313832
"volumes": [

0 commit comments

Comments
 (0)