diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2cafe78..4e87340 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,7 @@ stages: - security - upload - image + - integrationtest services: - docker:19.03.12-dind @@ -138,4 +139,21 @@ backup-image-test-publish: rules: - if: '$CI_COMMIT_TAG != null' script: - - cd infrastructure/docker-backup && pyb image test publish \ No newline at end of file + - cd infrastructure/docker-backup && pyb image test publish + +nextcloud-integrationtest: + stage: integrationtest + image: docker:latest + services: + - docker:dind + dependencies: + - package + before_script: + - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY + script: + - echo "---------- Integration test -------------" +# - docker build --pull -t "$CI_REGISTRY_IMAGE" . +# - docker run --privileged -dit --name provs_test -v /var/run/docker.sock:/var/run/docker.sock $CI_REGISTRY_IMAGE +# - docker inspect -f '{{.State.Running}}' provs_test + - ./src/test/resources/local-integration-test/setup-docker.sh + \ No newline at end of file diff --git a/src/test/resources/local-integration-test/setup-docker.sh b/src/test/resources/local-integration-test/setup-docker.sh old mode 100644 new mode 100755 diff --git a/src/test/resources/local-integration-test/setup-local-s3-on-k3d.sh b/src/test/resources/local-integration-test/setup-local-s3-on-k3d.sh index 181b213..531cfbe 100755 --- a/src/test/resources/local-integration-test/setup-local-s3-on-k3d.sh +++ b/src/test/resources/local-integration-test/setup-local-s3-on-k3d.sh @@ -39,7 +39,7 @@ function main() echo POD=$(kubectl get pod -l app=backup-restore -o name) - kubectl wait $POD --for=condition=Ready --timeout=120s + kubectl wait $POD --for=condition=Ready --timeout=240s kubectl exec -t $POD -- bash -c "echo \"$ENDPOINT k3stesthost cloudhost\" >> /etc/hosts" kubectl exec -t $POD -- /usr/local/bin/init.sh kubectl exec -t $POD -- /usr/local/bin/backup.sh