diff --git a/.drone.star b/.drone.star index 567cb5e4bb1..bcfdc3e4a47 100644 --- a/.drone.star +++ b/.drone.star @@ -1104,8 +1104,8 @@ def localApiTestPipeline(ctx): "arch": "amd64", }, "steps": skipIfUnchanged(ctx, "acceptance-tests") + - restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin") + - (tikaService() if params["tikaNeeded"] else []) + + ([] if run_on_k8s else restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin")) + + (tikaService() if params["tikaNeeded"] and not run_on_k8s else tikaServiceK8s() if params["tikaNeeded"] and run_on_k8s else []) + (waitForServices("online-offices", ["collabora:9980", "onlyoffice:443", "fakeoffice:8080"]) if params["collaborationServiceNeeded"] else []) + (waitK3sCluster() + 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]))) + (waitForClamavService() if params["antivirusNeeded"] else []) + @@ -3817,15 +3817,13 @@ def deployOcis(): "image": "owncloudci/golang:latest", "commands": [ "make -C %s build" % dirs["ocisWrapper"], - "mv %s/tests/config/drone/k3s/values.yaml %s/ocis-charts/charts/ocis/ci/deployment-values.yaml" % (dirs["base"], dirs["base"]), - "cp -r %s/tests/config/drone/k3s/authbasic %s/ocis-charts/charts/ocis/templates/" % (dirs["base"], dirs["base"]), + "mv %s/tests/config/drone/k8s/values.yaml %s/ocis-charts/charts/ocis/ci/deployment-values.yaml" % (dirs["base"], dirs["base"]), + "cp -r %s/tests/config/drone/k8s/authbasic %s/ocis-charts/charts/ocis/templates/" % (dirs["base"], dirs["base"]), "cd %s/ocis-charts" % dirs["base"], "sed -i '/{{- define \"ocis.basicServiceTemplates\" -}}/a\\\\ {{- $_ := set .scope \"appNameAuthBasic\" \"authbasic\" -}}' ./charts/ocis/templates/_common/_tplvalues.tpl", "sed -i '/- name: IDM_ADMIN_PASSWORD/{n;N;N;N;d;}' ./charts/ocis/templates/idm/deployment.yaml", "sed -i '/- name: IDM_ADMIN_PASSWORD/a\\\\\\n value: \"admin\"' ./charts/ocis/templates/idm/deployment.yaml", "sed -i '/- name: PROXY_HTTP_ADDR/i\\\\ - name: PROXY_ENABLE_BASIC_AUTH\\\n value: \"true\"' ./charts/ocis/templates/proxy/deployment.yaml", - "sed -i '/- name: FRONTEND_PASSWORD_POLICY_BANNED_PASSWORDS_LIST/{N;d;}' %s/ocis-charts/charts/ocis/templates/frontend/deployment.yaml" % dirs["base"], - "sed -i '/name: SHARING_PASSWORD_POLICY_BANNED_PASSWORDS_LIST/,+1d' %s/ocis-charts/charts/ocis/templates/sharing/deployment.yaml" % dirs["base"], "export KUBECONFIG=%s/kubeconfig-$${DRONE_BUILD_NUMBER}.yaml" % dirs["base"], "make helm-install-atomic", ], @@ -3863,3 +3861,13 @@ def waitForOciswrapper(url = "http://ociswrapper:5200", depends_on = []): ], "depends_on": depends_on, }] + +def tikaServiceK8s(): + return [{ + "name": "tika", + "type": "docker", + "image": OC_CI_ALPINE, + "commands": [ + "cp -r %s/tests/config/drone/k8s/tika %s/ocis-charts/charts/ocis/templates/" % (dirs["base"], dirs["base"]), + ], + }] diff --git a/tests/config/drone/k3s/authbasic/deployment.yaml b/tests/config/drone/k8s/authbasic/deployment.yaml similarity index 100% rename from tests/config/drone/k3s/authbasic/deployment.yaml rename to tests/config/drone/k8s/authbasic/deployment.yaml diff --git a/tests/config/drone/k3s/authbasic/hpa.yaml b/tests/config/drone/k8s/authbasic/hpa.yaml similarity index 100% rename from tests/config/drone/k3s/authbasic/hpa.yaml rename to tests/config/drone/k8s/authbasic/hpa.yaml diff --git a/tests/config/drone/k3s/authbasic/pdb.yaml b/tests/config/drone/k8s/authbasic/pdb.yaml similarity index 100% rename from tests/config/drone/k3s/authbasic/pdb.yaml rename to tests/config/drone/k8s/authbasic/pdb.yaml diff --git a/tests/config/drone/k3s/authbasic/services.yaml b/tests/config/drone/k8s/authbasic/services.yaml similarity index 100% rename from tests/config/drone/k3s/authbasic/services.yaml rename to tests/config/drone/k8s/authbasic/services.yaml diff --git a/tests/config/drone/k8s/tika/deployment.yaml b/tests/config/drone/k8s/tika/deployment.yaml new file mode 100644 index 00000000000..af7381ee497 --- /dev/null +++ b/tests/config/drone/k8s/tika/deployment.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: tika +spec: + replicas: 1 + selector: + matchLabels: + app: tika + template: + metadata: + labels: + app: tika + spec: + containers: + - name: tika + image: apache/tika:latest + ports: + - containerPort: 9998 \ No newline at end of file diff --git a/tests/config/drone/k8s/tika/service.yaml b/tests/config/drone/k8s/tika/service.yaml new file mode 100644 index 00000000000..1ae6b36398a --- /dev/null +++ b/tests/config/drone/k8s/tika/service.yaml @@ -0,0 +1,12 @@ +apiVersion: v1 +kind: Service +metadata: + name: tika-service +spec: + selector: + app: tika + ports: + - protocol: TCP + port: 9998 + targetPort: 9998 + type: ClusterIP \ No newline at end of file diff --git a/tests/config/drone/k3s/values.yaml b/tests/config/drone/k8s/values.yaml similarity index 96% rename from tests/config/drone/k3s/values.yaml rename to tests/config/drone/k8s/values.yaml index c898803ef8e..7a3684f6c58 100644 --- a/tests/config/drone/k3s/values.yaml +++ b/tests/config/drone/k8s/values.yaml @@ -82,6 +82,10 @@ services: accessModes: - ReadWriteOnce search: + extractor: + type: "tika" + tika: + url: "http://tika:9998" persistence: enabled: true accessModes: