Skip to content

Commit 2b29879

Browse files
committed
Fix workflow status: analysis step is now informational only
1 parent 5a63572 commit 2b29879

1 file changed

Lines changed: 23 additions & 49 deletions

File tree

.github/workflows/maven-compatibility-test.yml

Lines changed: 23 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -260,75 +260,49 @@ jobs:
260260
echo ""
261261
echo "Build complete - checking for compatibility issues..."
262262
263-
- name: Check for compatibility errors
264-
if: always()
263+
- name: Analyze build failure (if any)
264+
if: failure()
265+
continue-on-error: true
265266
working-directory: ${{ github.workspace }}/testdata/maven-compatibility-test
266267
run: |
267-
# Check if the test actually ran
268-
if [ ! -f maven-output.log ]; then
269-
echo "❌ ERROR: No output log found!"
270-
echo "This usually means configuration or test setup failed."
271-
echo "Check previous steps for errors."
272-
exit 1
273-
fi
274-
275-
echo "Analyzing Maven output..."
268+
echo "============================================"
269+
echo "Build Failure Analysis"
270+
echo "============================================"
276271
echo ""
277272
278-
# Check for success
279-
if grep -q "BUILD SUCCESS" maven-output.log; then
280-
echo "✅ Maven build completed successfully"
281-
echo "Maven ${{ matrix.maven-version }} with Java ${{ matrix.java-version }} - COMPATIBLE"
273+
if [ ! -f maven-output.log ]; then
274+
echo "❌ No maven-output.log found - build may have failed before Maven ran"
282275
exit 0
283276
fi
284277
285-
# Build failed - check for Maven COMPATIBILITY issues (not build issues)
286-
echo "⚠️ Maven build failed - analyzing for compatibility errors..."
278+
echo "Checking for compatibility errors..."
287279
echo ""
288280
289281
# Check for Maven version compatibility issues
290-
if grep -q "NullPointerException.*is null" maven-output.log; then
282+
if grep -q "NullPointerException" maven-output.log; then
291283
echo "❌ COMPATIBILITY ERROR: NullPointerException detected!"
292-
echo "Maven ${{ matrix.maven-version }} is INCOMPATIBLE with build-info extractor"
293284
echo ""
294-
echo "This indicates missing field declarations in components.xml"
285+
echo "Maven ${{ matrix.maven-version }} is INCOMPATIBLE with build-info extractor"
286+
echo "This likely indicates missing field declarations in components.xml"
295287
echo ""
296-
echo "Error details:"
297-
grep -B3 -A5 "NullPointerException" maven-output.log | head -20
298-
exit 1
288+
echo "Error context:"
289+
grep -B5 -A10 "NullPointerException" maven-output.log | head -30
299290
300291
elif grep -q "NoSuchMethodError\|NoClassDefFoundError\|IncompatibleClassChangeError" maven-output.log; then
301-
echo "❌ COMPATIBILITY ERROR: Class/method compatibility issue detected!"
302-
echo "Maven ${{ matrix.maven-version }} is INCOMPATIBLE with build-info extractor"
292+
echo "❌ COMPATIBILITY ERROR: Class/method compatibility issue!"
303293
echo ""
304-
echo "Error details:"
305-
grep -B3 -A5 "NoSuchMethodError\|NoClassDefFoundError\|IncompatibleClassChangeError" maven-output.log | head -20
306-
exit 1
294+
echo "Error context:"
295+
grep -B5 -A10 "NoSuchMethodError\|NoClassDefFoundError\|IncompatibleClassChangeError" maven-output.log | head -30
307296
308297
else
309-
# Build failed but not due to Maven compatibility - could be:
310-
# - Compilation errors (test code issue)
311-
# - Network issues (transient)
312-
# - Missing dependencies (test setup issue)
313-
echo "⚠️ Build failed, but NO Maven compatibility errors detected"
298+
echo "ℹ️ No obvious Maven compatibility errors detected"
314299
echo ""
315-
316-
# Check if extractor actually ran
317-
if grep -q "Running Mvn\|Running mvn command\|Downloading JFrog's Dependency\|Initializing Artifactory Build-Info Recording" maven-output.log; then
318-
echo "✅ Build-info extractor loaded and ran successfully"
319-
echo "Maven ${{ matrix.maven-version }} with Java ${{ matrix.java-version }} - COMPATIBLE"
320-
echo ""
321-
echo "Note: Build failed for other reasons (not Maven compatibility)"
322-
echo "Last 30 lines of output:"
323-
tail -30 maven-output.log
324-
exit 0
325-
else
326-
echo "❓ Extractor may not have loaded - manual review needed"
327-
echo "Last 50 lines of output:"
328-
tail -50 maven-output.log
329-
exit 1
330-
fi
300+
echo "Last 50 lines of output:"
301+
tail -50 maven-output.log
331302
fi
303+
304+
echo ""
305+
echo "Full logs available in artifacts"
332306
333307
- name: Upload logs (on failure)
334308
if: failure()

0 commit comments

Comments
 (0)