From 082e4bc28969081f165fa60d1b8d740ed82f2bb1 Mon Sep 17 00:00:00 2001 From: Juan Cruz Viotti Date: Tue, 6 Aug 2024 10:55:37 -0400 Subject: [PATCH] Add a basic healthcheck Signed-off-by: Juan Cruz Viotti --- .github/workflows/main.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0203c96..ccd0108 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,5 +39,13 @@ jobs: run: | kraft cloud service create --name schemas --domain schemas.intelligence.ai 443:8000 || true kraft cloud deploy --memory 256 --rollout remove --image schemas --service schemas --kraftfile Kraftfile + curl --location --fail ${{ steps.refs.outputs.url }} env: KRAFTCLOUD_TOKEN: ${{ secrets.KRAFTCLOUD_TOKEN }} + + - name: Dump instance logs on failure + if: ${{ steps.deploy.outcome == 'failure' }} + uses: unikraft/kraftkit@staging + with: + run: | + kraft cloud vm logs "$(kraft cloud svc get www | jq --raw-output '.data.service_groups[].instances[].name')"