2 Commits

Author SHA1 Message Date
9c36be162f remove fallback
Some checks failed
Release - Northern Thailand Ping River Monitor / Create Release (push) Successful in 7s
Release - Northern Thailand Ping River Monitor / Test Release Build (3.10) (push) Successful in 13s
Release - Northern Thailand Ping River Monitor / Test Release Build (3.11) (push) Successful in 12s
Release - Northern Thailand Ping River Monitor / Test Release Build (3.12) (push) Successful in 13s
Release - Northern Thailand Ping River Monitor / Test Release Build (3.9) (push) Successful in 13s
Release - Northern Thailand Ping River Monitor / Build Release Images (push) Successful in 4m27s
Release - Northern Thailand Ping River Monitor / Security Scan (push) Successful in 5s
Release - Northern Thailand Ping River Monitor / Test Release Deployment (push) Successful in 1m45s
Release - Northern Thailand Ping River Monitor / Notify Release (push) Successful in 2s
CI/CD Pipeline - Northern Thailand Ping River Monitor / Test Suite (3.10) (push) Failing after 14s
CI/CD Pipeline - Northern Thailand Ping River Monitor / Test Suite (3.11) (push) Failing after 15s
CI/CD Pipeline - Northern Thailand Ping River Monitor / Test Suite (3.12) (push) Failing after 12s
CI/CD Pipeline - Northern Thailand Ping River Monitor / Test Suite (3.9) (push) Failing after 10s
CI/CD Pipeline - Northern Thailand Ping River Monitor / Build Docker Image (push) Has been skipped
CI/CD Pipeline - Northern Thailand Ping River Monitor / Integration Test with Services (push) Has been skipped
CI/CD Pipeline - Northern Thailand Ping River Monitor / Code Quality (push) Successful in 11s
Security & Dependency Updates / Check for Dependency Updates (push) Successful in 43s
CI/CD Pipeline - Northern Thailand Ping River Monitor / Deploy to Staging (push) Has been skipped
CI/CD Pipeline - Northern Thailand Ping River Monitor / Deploy to Production (push) Has been skipped
CI/CD Pipeline - Northern Thailand Ping River Monitor / Cleanup (push) Successful in 2s
CI/CD Pipeline - Northern Thailand Ping River Monitor / Performance Test (push) Has been skipped
Security & Dependency Updates / Dependency Security Scan (push) Successful in 39s
Security & Dependency Updates / License Compliance (push) Successful in 20s
Security & Dependency Updates / Code Quality Metrics (push) Successful in 1m8s
Security & Dependency Updates / Security Summary (push) Successful in 23s
2025-08-13 19:51:42 +07:00
c3498bda76 test
Some checks failed
Release - Northern Thailand Ping River Monitor / Create Release (push) Successful in 5s
Security & Dependency Updates / Dependency Security Scan (push) Successful in 22s
Security & Dependency Updates / License Compliance (push) Successful in 10s
Security & Dependency Updates / Check for Dependency Updates (push) Successful in 17s
Security & Dependency Updates / Code Quality Metrics (push) Successful in 13s
Release - Northern Thailand Ping River Monitor / Test Release Build (3.10) (push) Successful in 13s
Release - Northern Thailand Ping River Monitor / Test Release Build (3.9) (push) Successful in 15s
Security & Dependency Updates / Security Summary (push) Successful in 6s
Release - Northern Thailand Ping River Monitor / Test Release Build (3.11) (push) Successful in 13s
Release - Northern Thailand Ping River Monitor / Test Release Build (3.12) (push) Successful in 15s
Release - Northern Thailand Ping River Monitor / Build Release Images (push) Successful in 6m34s
Release - Northern Thailand Ping River Monitor / Security Scan (push) Successful in 3s
Release - Northern Thailand Ping River Monitor / Test Release Deployment (push) Failing after 57s
Release - Northern Thailand Ping River Monitor / Notify Release (push) Successful in 1s
2025-08-13 17:16:49 +07:00

View File

@@ -187,16 +187,16 @@ jobs:
run: |
set -euo pipefail
echo "🚀 Testing ${{ needs.create-release.outputs.version }} deployment locally..."
# Create a dedicated network so we can resolve by container name
docker network create ci_net || true
# Pull the built image
docker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.create-release.outputs.version }}
# Stop & remove any existing container
docker rm -f ping-river-monitor-test 2>/dev/null || true
# Start the container on the user-defined network
docker run -d \
--name ping-river-monitor-test \
@@ -205,24 +205,24 @@ jobs:
-e LOG_LEVEL=INFO \
-e DB_TYPE=sqlite \
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.create-release.outputs.version }}
echo "✅ Container started for testing"
- name: Health check after deployment
run: |
set -euo pipefail
echo "⏳ Waiting for application to start..."
# Pull a curl-only image for probing (keeps your app image slim)
docker pull curlimages/curl:8.10.1
# Helper: curl via a sibling container on the SAME Docker network
probe() {
local url="$1"
docker run --rm --network ci_net curlimages/curl:8.10.1 \
-sS --max-time 5 --connect-timeout 3 -w "HTTP_CODE:%{http_code}" "$url" || true
}
# Wait for /health (up to ~3m 45s)
for i in {1..15}; do
echo "🔍 Attempt $i/15: checking http://ping-river-monitor-test:8000/health"
@@ -246,7 +246,7 @@ jobs:
exit 1
fi
done
echo "🧪 Testing API endpoints…"
endpoints=("health" "docs" "stations" "metrics")
for ep in "${endpoints[@]}"; do
@@ -262,19 +262,8 @@ jobs:
exit 1
fi
done
echo "✅ All health checks passed!"
- name: (Fallback) Probe via host-published port
if: always()
run: |
set -euo pipefail
# In case you also want to verify the host-published port from inside the job container:
HOST_GATEWAY="$(ip route | awk '/default/ {print $3}')"
echo "🔎 Host gateway is $HOST_GATEWAY — probing http://$HOST_GATEWAY:8080/health"
docker run --rm curlimages/curl:8.10.1 \
-sS --max-time 5 --connect-timeout 3 -w "HTTP_CODE:%{http_code}\n" \
"http://$HOST_GATEWAY:8080/health" || true
echo "✅ All health checks passed!"
- name: Container logs and cleanup
if: always()