Skip to content

Commit

Permalink
Fixed nib check exit code handling in test-nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
mateipopa committed Jan 22, 2025
1 parent 734d792 commit 9e930bc
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1021,12 +1021,19 @@ jobs:
# Run nib image check and capture output
echo "Running: nib image check --variant $variant --path ${{ matrix.image_path }}/babel.yaml-test"
OUTPUT=$(nib image check --variant $variant --path ${{ matrix.image_path }}/babel.yaml-test 2>&1 || true)
OUTPUT=$(nib image check --variant $variant --path ${{ matrix.image_path }}/babel.yaml-test 2>&1)
NIB_EXIT=$?
echo "nib image check output:"
echo "$OUTPUT"
echo "nib exit code: $NIB_EXIT"
# Check if node was started regardless of final exit code
if [ $NIB_EXIT -ne 0 ]; then
echo "Error: nib image check failed with exit code $NIB_EXIT"
((CHECK_FAILED++))
continue
fi
# Only proceed with node operations if nib check passed
if echo "$OUTPUT" | grep -q "Node started"; then
# Extract node name from the 'Created ... dev_node' line
NODE_NAME=$(echo "$OUTPUT" | grep -o "'[^']*'" | head -1 | tr -d "'")
Expand All @@ -1052,11 +1059,6 @@ jobs:
echo "Successfully started node ${NODE_NAME}"
fi
fi
if [ $NIB_EXIT -ne 0 ]; then
echo "Error: nib image check failed with exit code $NIB_EXIT"
((CHECK_FAILED++))
fi
done
# Post comment about all deployed nodes
Expand Down

0 comments on commit 9e930bc

Please sign in to comment.