Compare commits

...

1 Commits

Author SHA1 Message Date
CI Bot 819d3ae23d fix: prevent docker images grep from failing build with set -e
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 37s
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 1m10s
CI/CD Pipeline / Build & Push Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI/CD Pipeline / Build Production Runtime Images (pull_request) Has been skipped
CI/CD Pipeline / Unit Tests (pull_request) Successful in 1m25s
CI/CD Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI/CD Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI/CD Pipeline / Deploy Production (pull_request) Has been skipped
CI/CD Pipeline / Production Browser E2E (pull_request) Has been skipped
CI/CD Pipeline / Integration Tests (pull_request) Successful in 2m1s
The last line of the build script uses grep to display built images,
but with set -e, grep returning no matches causes the entire script
to fail. This is a classic set -e footgun.

The grep pattern was also broken: docker images shows REPOSITORY and
TAG as separate columns (no ':' between them), so 'xiaoxia-saas.*:'
never matched. Changed to two-stage grep and added || true safety net.

The build and push were actually succeeding - only the final display
line was causing the failure.
2026-07-14 09:39:31 +08:00
+1 -1
View File
@@ -179,4 +179,4 @@ else
fi
echo "=== Build complete ==="
docker images | grep "xiaoxia-saas.*:$VERSION"
docker images | grep "xiaoxia-saas" | grep "$VERSION" || true