1
0
Fork 0
mirror of https://code.forgejo.org/actions/cascading-pr synced 2025-03-15 14:54:40 +01:00

prefix the logs with a marker for debug

This commit is contained in:
Earl Warren 2023-10-13 22:30:22 +02:00
parent b89d03dbb7
commit ff91240ee5
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 6 additions and 3 deletions

View file

@ -17,12 +17,14 @@ jobs:
image-version: 1.21.0-3-rc0 image-version: 1.21.0-3-rc0
lxc-ip-prefix: 10.1.15 lxc-ip-prefix: 10.1.15
- name: tests - name: tests cascading-pr
run: | run: |
runner_config=$(pwd)/tests/runner-config.yaml runner_config=$(pwd)/tests/runner-config.yaml
sed -i -e 's|file: .runner|file: ${{ steps.forgejo.outputs.runner-file }}|' $runner_config sed -i -e 's|file: .runner|file: ${{ steps.forgejo.outputs.runner-file }}|' $runner_config
FORGEJO_RUNNER_CONFIG=$runner_config forgejo-runner.sh reload FORGEJO_RUNNER_CONFIG=$runner_config forgejo-runner.sh reload
if ! tests/run.sh --host_port ${{ steps.forgejo.outputs.host-port }} --url ${{ steps.forgejo.outputs.url }} --token ${{ steps.forgejo.outputs.token }} ; then if ! tests/run.sh --debug --host_port ${{ steps.forgejo.outputs.host-port }} --url ${{ steps.forgejo.outputs.url }} --token ${{ steps.forgejo.outputs.token }} ; then
cat ${{ steps.forgejo.outputs.runner-logs }} sed -e 's/^/[RUNNER LOGS] /' ${{ steps.forgejo.outputs.runner-logs }}
docker logs forgejo | sed -e 's/^/[FORGEJO LOGS]/'
exit 1 exit 1
fi fi
sleep 5 # hack to avoid mixing outputs in Forgejo v1.21

View file

@ -5,6 +5,7 @@ set -e
SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" SELF_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
TMPDIR=/tmp/cascading-pr-test TMPDIR=/tmp/cascading-pr-test
mkdir -p $TMPDIR
source $SELF_DIR/../cascading-pr-lib.sh source $SELF_DIR/../cascading-pr-lib.sh
function push_self() { function push_self() {