From 20c3524cd08d275b14744cd88cf3acbecc9936e4 Mon Sep 17 00:00:00 2001 From: escoand Date: Fri, 16 Aug 2024 11:30:51 +0200 Subject: [PATCH] wait for started db --- .github/workflows/test_kube.yaml | 15 ++------------- kube/nextcloud.yaml | 1 + kube/wordpress1.yaml | 1 + kube/wordpress2.yaml | 1 + 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test_kube.yaml b/.github/workflows/test_kube.yaml index 9e94bbb..c1ab976 100644 --- a/.github/workflows/test_kube.yaml +++ b/.github/workflows/test_kube.yaml @@ -31,14 +31,7 @@ jobs: run: |- set -euo pipefail find init/ -name 'secrets.*.yaml' -print -exec podman kube play {} \; - find kube/ -name '*.yaml' -print -exec podman kube play --quiet --start=false {} \; - - name: Start databases - run: |- - set -euo pipefail - podman pod start mariadb - podman wait --condition healthy mariadb-app - - name: Start pods - run: podman pod start -a + find kube/ -name '*.yaml' -print -exec podman kube play --quiet {} \; - name: Wait for healthy state run: |- set -euo pipefail @@ -120,9 +113,5 @@ jobs: if: ${{ always() }} run: |- set -euo pipefail - yq -ot '. as $parent | ( - .spec.containers[] | $parent.metadata.name + "-" + .name, - .spec.template.spec.containers[] | $parent.metadata.name + "-pod-" + .name, - .spec.initContainers[] | $parent.metadata.name + "-" + .name - )' kube/*.yaml | + podman ps -aq | xargs -tn1 podman logs -n diff --git a/kube/nextcloud.yaml b/kube/nextcloud.yaml index 99b2416..fa3b545 100644 --- a/kube/nextcloud.yaml +++ b/kube/nextcloud.yaml @@ -87,6 +87,7 @@ spec: - sh - -c - |- + until mariadb --skip-ssl -h mariadb -p"$MARIADB_ROOT_PASSWORD" -e "select 1"; do sleep 3; done cat <