Skip to content

Commit 08df2ac

Browse files
nirajacharya2Niraj Acharya
authored andcommitted
run ocm service on kubernetes
1 parent 23e44a3 commit 08df2ac

File tree

1 file changed

+42
-20
lines changed

1 file changed

+42
-20
lines changed

.drone.star

Lines changed: 42 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ S3_PUBLIC_CACHE_BUCKET = "public"
8585
# configuration
8686
config = {
8787
"cs3ApiTests": {
88-
"skip": False,
88+
"skip": True,
8989
},
9090
"wopiValidatorTests": {
91-
"skip": False,
91+
"skip": True,
9292
},
9393
"k6LoadTests": {
94-
"skip": False,
94+
"skip": True,
9595
},
9696
"localApiTests": {
9797
"contractAndLock": {
@@ -130,7 +130,7 @@ config = {
130130
],
131131
"skip": False,
132132
"withRemotePhp": [False],
133-
"k8s": False,
133+
"k8s": True,
134134
},
135135
"spaces": {
136136
"suites": [
@@ -155,7 +155,7 @@ config = {
155155
"apiArchiver",
156156
"apiActivities",
157157
],
158-
"skip": False,
158+
"skip": True,
159159
},
160160
"groupAndSearch1": {
161161
"suites": [
@@ -164,7 +164,7 @@ config = {
164164
"apiGraphGroup",
165165
"apiServiceAvailability",
166166
],
167-
"skip": False,
167+
"skip": True,
168168
"k8s": False,
169169
},
170170
"search2": {
@@ -173,7 +173,7 @@ config = {
173173
"apiSearchContent",
174174
],
175175
"tikaNeeded": True,
176-
"skip": False,
176+
"skip": True,
177177
"k8s": False,
178178
},
179179
"sharingNg1": {
@@ -215,7 +215,7 @@ config = {
215215
"suites": [
216216
"apiAntivirus",
217217
],
218-
"skip": False,
218+
"skip": True,
219219
"antivirusNeeded": True,
220220
"extraServerEnvironment": {
221221
"ANTIVIRUS_SCANNER_TYPE": "clamav",
@@ -228,7 +228,7 @@ config = {
228228
"ocmAndAuthApp": {
229229
"suites": [
230230
"apiOcm",
231-
"apiAuthApp",
231+
# "apiAuthApp",
232232
],
233233
"skip": False,
234234
"withRemotePhp": [False],
@@ -363,29 +363,29 @@ config = {
363363
"coreApiWebdavUpload",
364364
"coreApiWebdavUploadTUS",
365365
],
366-
"skip": False,
366+
"skip": True,
367367
},
368368
},
369369
"e2eTests": {
370370
"part": {
371-
"skip": False,
371+
"skip": True,
372372
"totalParts": 4, # divide and run all suites in parts (divide pipelines)
373373
"xsuites": ["search", "app-provider", "oidc", "ocm", "keycloak"], # suites to skip
374374
},
375375
"search": {
376-
"skip": False,
376+
"skip": True,
377377
"suites": ["search"], # suites to run
378378
"tikaNeeded": True,
379379
},
380380
"keycloak": {
381-
"skip": False,
381+
"skip": True,
382382
"suites": ["journeys", "keycloak"],
383383
"keycloakNeeded": True,
384384
},
385385
},
386386
"e2eMultiService": {
387387
"testSuites": {
388-
"skip": False,
388+
"skip": True,
389389
"suites": [
390390
"smoke",
391391
"shares",
@@ -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
@@ -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
@@ -3501,7 +3501,7 @@ def apiTestFailureLog():
35013501
"name": "api-test-failure-logs",
35023502
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
35033503
"commands": [
3504-
"cat %s/tests/acceptance/logs/failed.log" % dirs["base"],
3504+
# "cat %s/tests/acceptance/logs/failed.log" % dirs["base"],
35053505
],
35063506
"when": {
35073507
"status": [
@@ -3614,7 +3614,7 @@ def waitForOcis(name = "ocis", ocis_url = OCIS_URL, depends_on = []):
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 600 bash -c 'while [ $(curl -sk -uadmin:admin " +
36183618
"%s/graph/v1.0/users/admin " % ocis_url +
36193619
"-w %{http_code} -o /dev/null) != 200 ]; do sleep 1; done'",
36203620
],
@@ -3777,6 +3777,7 @@ def k3sCluster():
37773777
"user": "root",
37783778
"privileged": True,
37793779
"commands": [
3780+
"rm -rf ocis-charts",
37803781
"git clone --single-branch --branch main --depth 1 https://github.com/owncloud/ocis-charts.git",
37813782
"nohup dockerd-entrypoint.sh &",
37823783
"until docker ps 2>&1 > /dev/null; do sleep 1s; done",
@@ -3826,7 +3827,7 @@ def deployOcis():
38263827
"sed -i '/- name: IDM_ADMIN_PASSWORD/a\\\\\\n value: \"admin\"' ./charts/ocis/templates/idm/deployment.yaml",
38273828
"sed -i '/- name: PROXY_HTTP_ADDR/i\\\\ - name: PROXY_ENABLE_BASIC_AUTH\\\n value: \"true\"' ./charts/ocis/templates/proxy/deployment.yaml",
38283829
"export KUBECONFIG=%s/kubeconfig-$${DRONE_BUILD_NUMBER}.yaml" % dirs["base"],
3829-
"make helm-install-atomic",
3830+
"helm install -n ocis --create-namespace --values charts/ocis/ci/deployment-values.yaml --atomic --timeout 10m0s ocis charts/ocis/",
38303831
],
38313832
"volumes": [
38323833
{
@@ -3836,6 +3837,27 @@ def deployOcis():
38363837
],
38373838
}]
38383839

3840+
def deployFedOcis():
3841+
return [{
3842+
"name": "deploy-ocis",
3843+
"image": "ghcr.io/helmfile/helmfile:v0.156.0",
3844+
"commands": [
3845+
"cd ocis-charts",
3846+
"cp deployments/ocm-install/helmfile.yaml deployments/ocm-install/helmfile.yaml.gotmpl",
3847+
"helmfile sync",
3848+
],
3849+
"volumes": [
3850+
{
3851+
"name": "gopath",
3852+
"path": "/go",
3853+
},
3854+
],
3855+
"extra_hosts": [
3856+
"myservice.local:192.168.1.100",
3857+
"another.local:10.0.0.5",
3858+
],
3859+
}]
3860+
38393861
def clamavServiceK8s():
38403862
return [{
38413863
"name": "clamav",
@@ -3901,7 +3923,7 @@ def waitForOciswrapper(url = "http://ociswrapper:5200", depends_on = []):
39013923
"name": "wait-for-wrapper",
39023924
"image": OC_CI_ALPINE,
39033925
"commands": [
3904-
"timeout 60 bash -c 'while [ $(curl -sk " +
3926+
"timeout 600 bash -c 'while [ $(curl -sk " +
39053927
"%s " % url +
39063928
"-w %{http_code} -o /dev/null) != 404 ]; do sleep 1; done'",
39073929
],

0 commit comments

Comments
 (0)