From c16405df52241cfd7f6a13f662e63af3858c8f44 Mon Sep 17 00:00:00 2001 From: Earl Warren Date: Mon, 27 Mar 2023 17:46:00 +0200 Subject: [PATCH] display the runner logs on failure for debugging --- .forgejo/workflows/integration.yml | 1 + testdata/run.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/integration.yml b/.forgejo/workflows/integration.yml index b7897b2..b8c8659 100644 --- a/.forgejo/workflows/integration.yml +++ b/.forgejo/workflows/integration.yml @@ -12,6 +12,7 @@ jobs: image-version: 1.19 - name: 001 run: | + export FORGEJO_RUNNER_LOGS="${{ steps.forgejo.outputs.runner-logs }}" testdata/run.sh push_self http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser setup-forgejo-release testdata/run.sh workflow http://testuser:admin1234@${{ steps.forgejo.outputs.host-port }} testuser try-setup-forgejo-release - name: 002 diff --git a/testdata/run.sh b/testdata/run.sh index 4f2637e..0ec1b5f 100755 --- a/testdata/run.sh +++ b/testdata/run.sh @@ -2,6 +2,7 @@ set -ex +: ${FORGEJO_RUNNER_LOGS:=../setup-forgejo/forgejo-runner.log} DATA=$(dirname $0) DIR=$(mktemp -d) @@ -32,7 +33,7 @@ function wait_success() { sleep 5 done if ! test "$(check_status "$forgejo" "$repo" "$sha")" = "success" ; then - cat forgejo-runner.log + cat $FORGEJO_RUNNER_LOGS return 1 fi }