diff --git a/.github/workflows/ci-cassandra.yml b/.github/workflows/ci-cassandra.yml index 0c2304bccf9..15cbfdb5a62 100644 --- a/.github/workflows/ci-cassandra.yml +++ b/.github/workflows/ci-cassandra.yml @@ -44,8 +44,13 @@ jobs: go-version: 1.22.x - name: Run cassandra integration tests + id: test-execution run: bash scripts/cassandra-integration-test.sh ${{ matrix.version.image }} ${{ matrix.version.schema }} ${{ matrix.jaeger-version }} + - name: Output Cassandra logs + run: docker logs ${{ steps.test-execution.outputs.cid }} + if: ${{ failure() }} + - name: Upload coverage to codecov uses: ./.github/actions/upload-codecov with: diff --git a/.github/workflows/ci-elasticsearch.yml b/.github/workflows/ci-elasticsearch.yml index 92781ce6a54..6c2175c8971 100644 --- a/.github/workflows/ci-elasticsearch.yml +++ b/.github/workflows/ci-elasticsearch.yml @@ -58,8 +58,13 @@ jobs: - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - name: Run elasticsearch integration tests + id: test-execution run: bash scripts/es-integration-test.sh ${{ matrix.version.distribution }} ${{ matrix.version.image }} + - name: Output Elasticsearch logs + run: docker logs ${{ steps.test-execution.outputs.cid }} + if: ${{ failure() }} + - name: Upload coverage to codecov uses: ./.github/actions/upload-codecov with: diff --git a/.github/workflows/ci-opensearch.yml b/.github/workflows/ci-opensearch.yml index ada7ba1a015..6556a36360c 100644 --- a/.github/workflows/ci-opensearch.yml +++ b/.github/workflows/ci-opensearch.yml @@ -52,8 +52,13 @@ jobs: - uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3.0.0 - name: Run opensearch integration tests + id: test-execution run: bash scripts/es-integration-test.sh ${{ matrix.version.distribution }} ${{ matrix.version.image }} + - name: Output Opensearch logs + run: docker logs ${{ steps.test-execution.outputs.cid }} + if: ${{ failure() }} + - name: Upload coverage to codecov uses: ./.github/actions/upload-codecov with: diff --git a/scripts/cassandra-integration-test.sh b/scripts/cassandra-integration-test.sh index 294122b3fb4..e73c628b59d 100755 --- a/scripts/cassandra-integration-test.sh +++ b/scripts/cassandra-integration-test.sh @@ -18,13 +18,13 @@ setup_cassandra() { local tag=$1 local image=cassandra local params=( - --rm --detach --publish 9042:9042 --publish 9160:9160 ) local cid cid=$(docker run "${params[@]}" "${image}:${tag}") + echo "cid=${cid}" >> "$GITHUB_OUTPUT" echo "${cid}" } diff --git a/scripts/es-integration-test.sh b/scripts/es-integration-test.sh index fc036cf7da5..f4f11d4be6a 100755 --- a/scripts/es-integration-test.sh +++ b/scripts/es-integration-test.sh @@ -42,6 +42,7 @@ setup_es() { local cid cid=$(docker run "${params[@]}" "${image}:${tag}") + echo "cid=${cid}" >> "$GITHUB_OUTPUT" echo "${cid}" } @@ -57,6 +58,7 @@ setup_opensearch() { ) local cid cid=$(docker run "${params[@]}" "${image}:${tag}") + echo "cid=${cid}" >> "$GITHUB_OUTPUT" echo "${cid}" }