fix: apply Docker 24 network workaround and smoke tests to production deploy #64
@@ -151,8 +151,13 @@ jobs:
|
|||||||
|
|
||||||
deploy-dev:
|
deploy-dev:
|
||||||
name: Deploy to Dev
|
name: Deploy to Dev
|
||||||
runs-on: nas
|
runs-on: ubuntu-latest
|
||||||
needs: [backend-tests, frontend-tests]
|
needs: [backend-tests, frontend-tests]
|
||||||
|
container:
|
||||||
|
volumes:
|
||||||
|
- /var/packages/ContainerManager/target/usr/bin/docker:/usr/bin/docker
|
||||||
|
- /var/packages/ContainerManager/target/usr/bin/docker-compose:/usr/lib/docker/cli-plugins/docker-compose
|
||||||
|
- /volume1/docker/nas-dashboard:/volume1/docker/nas-dashboard
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
run: |
|
run: |
|
||||||
@@ -251,7 +256,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Run smoke tests
|
- name: Run smoke tests
|
||||||
run: |
|
run: |
|
||||||
cd /volume1/repos/nas-tools
|
|
||||||
bash scripts/smoke-test-dashboard.sh dev
|
bash scripts/smoke-test-dashboard.sh dev
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo "❌ Smoke tests failed! Check logs above."
|
echo "❌ Smoke tests failed! Check logs above."
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ fi
|
|||||||
|
|
||||||
# Test 5: Container health
|
# Test 5: Container health
|
||||||
echo "5. Checking container health..."
|
echo "5. Checking container health..."
|
||||||
HEALTH_STATUS=$(ssh nas "/volume1/@appstore/ContainerManager/usr/bin/docker inspect --format='{{.State.Health.Status}}' $CONTAINER" 2>/dev/null || echo "unknown")
|
HEALTH_STATUS=$(docker inspect --format='{{.State.Health.Status}}' $CONTAINER 2>/dev/null || echo "unknown")
|
||||||
if [ "$HEALTH_STATUS" = "healthy" ]; then
|
if [ "$HEALTH_STATUS" = "healthy" ]; then
|
||||||
echo "✅ Container is healthy"
|
echo "✅ Container is healthy"
|
||||||
else
|
else
|
||||||
@@ -68,7 +68,7 @@ fi
|
|||||||
|
|
||||||
# Test 6: Check recent logs for errors
|
# Test 6: Check recent logs for errors
|
||||||
echo "6. Checking for recent errors in logs..."
|
echo "6. Checking for recent errors in logs..."
|
||||||
ERROR_COUNT=$(ssh nas "/volume1/@appstore/ContainerManager/usr/bin/docker logs $CONTAINER --tail 50 2>&1 | grep -c 'ERROR' || echo 0")
|
ERROR_COUNT=$(docker logs $CONTAINER --tail 50 2>&1 | grep -c 'ERROR' || echo 0)
|
||||||
if [ "$ERROR_COUNT" -lt 5 ]; then
|
if [ "$ERROR_COUNT" -lt 5 ]; then
|
||||||
echo "✅ No critical errors in recent logs ($ERROR_COUNT errors)"
|
echo "✅ No critical errors in recent logs ($ERROR_COUNT errors)"
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user