From bab234d4bd305a8be90ecc71bd05597859b8d967 Mon Sep 17 00:00:00 2001 From: ansgarz Date: Thu, 9 Dec 2021 14:26:13 +0100 Subject: [PATCH] [skip ci] fix local ci --- .gitlab-ci.yml | 29 +++++++++---------- .../setup-local-s3-on-k3d.sh | 2 +- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index af568f7..282d7ab 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -153,24 +153,23 @@ backup-image-test-publish: - cd infrastructure/docker-backup && pyb image test publish nextcloud-integrationtest: - stage: integrationtest - image: docker:19.03.12 rules: - if: '$CI_COMMIT_BRANCH == "integration-test-w-o-db-backup"' + image: registry.gitlab.com/gitlab-org/cluster-integration/helm-install-image/releases/3.7.1-kube-1.20.11-alpine-3.14 services: - - docker:19.03.12-dind -# variables: -# DOCKER_HOST: tcp://172.17.0.1/ - before_script: - #- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - #- echo -n $CI_REGISTRY_PASSWORD | docker login --username $CI_REGISTRY_USER --password-stdin $CI_REGISTRY - - apk add bash - #- docker build --pull -t "$CI_REGISTRY_IMAGE" . - #- docker run --name "$name" -d --privileged --tmpfs /run --tmpfs /var/run --restart always -e K3S_TOKEN=12345678901234 -e K3S_KUBECONFIG_OUTPUT=./kubeconfig.yaml -e K3S_KUBECONFIG_MODE=666 -v k3s-server:/var/lib/rancher/k3s:z -v $(pwd):/output:z -p 6443:6443 -p 80:80 -p 443:443 rancher/k3s server --cluster-init --tls-san k3stesthost --tls-san cloudhost -# - docker run --name inttst -v /var/run/docker.sock:/var/run/docker.sock -d --privileged --tmpfs /run --tmpfs /var/run --restart always -e K3S_TOKEN=12345678901234 -e K3S_KUBECONFIG_OUTPUT=./kubeconfig.yaml -e K3S_KUBECONFIG_MODE=666 -v k3s-server:/var/lib/rancher/k3s:z -v $(pwd):/output:z -p 6443:6443 -p 80:80 -p 443:443 rancher/k3s server --cluster-init --tls-san k3stesthost --tls-san cloudhost - #- docker run --privileged -dit --name c4k_test -v /var/run/docker.sock:/var/run/docker.sock $CI_REGISTRY_IMAGE -# - docker inspect -f '{{.State.Running}}' c4k_test + - name: registry.gitlab.com/gitlab-org/cluster-integration/test-utils/k3s-gitlab-ci/releases/v1.22.2-k3s2 + alias: k3s script: + - apk add curl sudo bash + - apk add wget curl bash sudo openjdk8 + - wget -P /etc/apk/keys/ https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub + - apk add --no-cache --repository=https://apkproxy.herokuapp.com/sgerrand/alpine-pkg-leiningen leiningen + + - curl -f k3s:8081 > k3s.yaml + - export KUBECONFIG=$(pwd)/k3s.yaml + - kubectl version + - kubectl cluster-info - echo "---------- Integration test -------------" - pwd - - bash ./src/test/resources/local-integration-test/setup-docker.sh + - cd ./src/test/resources/local-integration-test/ && ./setup-local-s3-on-k3d.sh + 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 1a20055..f770273 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 @@ -34,7 +34,7 @@ function main() do curl --fail k3stesthost/health echo "[INFO] Waiting for s3 running" - sleep 3 + sleep 10 done echo