From cbd9bd3fd085e3c74620cc21ffb0d0818954eb19 Mon Sep 17 00:00:00 2001 From: ansgarz Date: Wed, 8 Dec 2021 11:27:17 +0100 Subject: [PATCH] wip --- infrastructure/docker-backup/image/resources/backup.sh | 2 +- src/test/resources/local-integration-test/setup-docker.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/infrastructure/docker-backup/image/resources/backup.sh b/infrastructure/docker-backup/image/resources/backup.sh index 22d7133..9a395fb 100755 --- a/infrastructure/docker-backup/image/resources/backup.sh +++ b/infrastructure/docker-backup/image/resources/backup.sh @@ -14,7 +14,7 @@ function main() { file_env RESTIC_DAYS_TO_KEEP 14 backup-roles 'oc_' - ;backup-db-dump + #backup-db-dump echo test-content > /var/backups/tmpfile backup-directory '/var/backups/' diff --git a/src/test/resources/local-integration-test/setup-docker.sh b/src/test/resources/local-integration-test/setup-docker.sh index 4ece0ca..4665b86 100755 --- a/src/test/resources/local-integration-test/setup-docker.sh +++ b/src/test/resources/local-integration-test/setup-docker.sh @@ -4,13 +4,17 @@ set -e docker volume create k3s-server -container_name='intst' +container_name='inttst' #[[ $(docker ps -f "name=$name" --format '{{.Names}}') == $name ]] || 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 ps -export timeout=30; while [ ! -f /var/lib/docker/volumes/k3s-server/_data/server/kubeconfig.yaml ]; do if [ "$timeout" == 0 ]; then echo "ERROR: Timeout while waiting for file."; docker ps -a; break; fi; sleep 1; ((timeout--)); done +#export timeout=30; while [ ! -f /var/lib/docker/volumes/k3s-server/_data/server/kubeconfig.yaml ]; do if [ "$timeout" == 0 ]; then echo "ERROR: Timeout while waiting for file."; docker ps -a; ls /var/lib/docker/volumes/k3s-server/_data/; break; fi; sleep 1; ((timeout--)); done +sleep 60 + +docker cp $name:/var/lib/rancher/k3s/server/kubeconfig.yaml /var/lib/docker/volumes/k3s-server/_data/server/ +ls /var/lib/docker/volumes/k3s-server/_data/server/ if [ "$timeout" == 0 ] then