From a7e1b2f882f8eb731c6662f7bb737426cf932ba2 Mon Sep 17 00:00:00 2001 From: bom Date: Wed, 1 Dec 2021 11:55:28 +0100 Subject: [PATCH] changed setup script to be able to run in ci --- .../resources/local-integration-test/README.md | 16 ++++++++++++++++ .../setup-local-s3-on-k3d.sh | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/src/test/resources/local-integration-test/README.md b/src/test/resources/local-integration-test/README.md index fe33ede..eb87aba 100644 --- a/src/test/resources/local-integration-test/README.md +++ b/src/test/resources/local-integration-test/README.md @@ -27,6 +27,22 @@ Note: In case of not being able to connect to "k3stesthost/health", you might ne - upload something `aws --endpoint-url=http://k3stesthost s3 cp test.txt s3://mybucket` - check files `aws --endpoint-url=http://k3stesthost s3 ls s3://mybucket` +## Run docker locally +`docker pull docker:19.03.12-dind` +`docker run --name integration-test docker:19.03.12-dind` +`docker exec -it integration-test sh` +`./setup-docker.sh` +`setup-local-s3-on-k3d.sh` + +`apk add git curl bash sudo openjdk8 wget` +`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` +`git pull https://gitlab.com/domaindrivenarchitecture/c4k-nextcloud.git` +`cd c4k-nextcloud` +Solange die Skripte nicht auf Main sind: `git checkout local-integration-test` +`cd src/test/resources/local-integration-test` +`./setup-local-s3-on-k3d.sh` + ## Deploy nextcloud 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 eb2e54a..65d03f8 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 @@ -2,10 +2,10 @@ function main() { local bucket_name="${1:-mybucket}"; shift - ./start-k3d.sh + # ./start-k3d.sh - source kubectl.sh - kubectl config use-context k3d-nextcloud + # source kubectl.sh + # kubectl config use-context k3d-nextcloud kubectl apply -f https://github.com/jetstack/cert-manager/releases/download/v1.5.4/cert-manager.yaml