8585
8686 # - name: Build opentelemetry-java-contrib with tests
8787 # uses: gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa #v2
88- # if: ${{ env.patch_otel_java_contrib == 'true' && inputs.run_tests != 'true ' }}
88+ # if: ${{ env.patch_otel_java_contrib == 'true' && inputs.run_tests != 'false ' }}
8989 # with:
9090 # arguments: build publishToMavenLocal --scan --no-daemon
9191 # build-root-directory: opentelemetry-java-contrib
9797 arguments : publishToMavenLocal --scan --no-daemon
9898 build-root-directory : opentelemetry-java-contrib
9999
100+ - name : Show opentelemetry-java-contrib build failures
101+ if : ${{ failure() && env.patch_otel_java_contrib == 'true' }}
102+ shell : bash
103+ run : |
104+ echo "=== OPENTELEMETRY-JAVA-CONTRIB BUILD FAILURES ==="
105+ cd opentelemetry-java-contrib
106+ find . -name "*.log" -exec grep -l "FAILED\|ERROR\|Exception" {} \; | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && grep -A 5 -B 5 "FAILED\|ERROR\|Exception" "{}"'
107+ echo "=== GRADLE BUILD SCAN URL ==="
108+ grep -o "https://gradle.com/s/[a-zA-Z0-9]*" build.log || echo "No build scan URL found"
109+
100110 - name : cleanup opentelemetry-java-contrib
101111 run : rm -rf opentelemetry-java-contrib
102112 if : ${{ env.patch_otel_java_contrib == 'true' }}
@@ -109,13 +119,33 @@ runs:
109119 arguments : check -x spotlessCheck publishToMavenLocal --scan --no-daemon
110120 build-root-directory : opentelemetry-java-instrumentation
111121
122+ - name : Show opentelemetry-java-instrumentation build failures
123+ if : ${{ failure() && env.patch_otel_java_instrumentation == 'true' }}
124+ shell : bash
125+ run : |
126+ echo "=== OPENTELEMETRY-JAVA-INSTRUMENTATION BUILD FAILURES ==="
127+ cd opentelemetry-java-instrumentation
128+ find . -name "*.log" -exec grep -l "FAILED\|ERROR\|Exception" {} \; | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && grep -A 5 -B 5 "FAILED\|ERROR\|Exception" "{}"'
129+ echo "=== GRADLE BUILD SCAN URL ==="
130+ grep -o "https://gradle.com/s/[a-zA-Z0-9]*" build.log || echo "No build scan URL found"
131+
112132 - name : Build opentelemetry java instrumentation
113133 uses : gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2
114134 if : ${{ env.patch_otel_java_instrumentation == 'true' && inputs.run_tests == 'true' }}
115135 with :
116136 arguments : publishToMavenLocal --scan --no-daemon
117137 build-root-directory : opentelemetry-java-instrumentation
118138
139+ - name : Show opentelemetry java instrumentation build failures
140+ if : ${{ failure() && env.patch_otel_java_instrumentation == 'true' }}
141+ shell : bash
142+ run : |
143+ echo "=== OPENTELEMETRY-JAVA-INSTRUMENTATION BUILD FAILURES ==="
144+ cd opentelemetry-java-instrumentation
145+ find . -name "*.log" -exec grep -l "FAILED\|ERROR\|Exception" {} \; | head -5 | xargs -I {} sh -c 'echo "=== {} ===" && grep -A 5 -B 5 "FAILED\|ERROR\|Exception" "{}"'
146+ echo "=== GRADLE BUILD SCAN URL ==="
147+ grep -o "https://gradle.com/s/[a-zA-Z0-9]*" build.log || echo "No build scan URL found"
148+
119149 - name : cleanup opentelmetry-java-instrumentation
120150 run : rm -rf opentelemetry-java-instrumentation
121151 if : ${{ env.patch_otel_java_instrumentation == 'true' }}
0 commit comments