fix: align deploy job with ubuntu-latest runner and fix smoke test docker access
- Change deploy-dev job from runs-on: nas to runs-on: ubuntu-latest with container volumes mounting NAS Docker CLI, compose plugin, and compose dir - Remove /volume1/repos/nas-tools path dependency in smoke test step - Replace ssh nas docker with direct docker commands in smoke test script (container now has Docker CLI access) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -151,8 +151,13 @@ jobs:
|
||||
|
||||
deploy-dev:
|
||||
name: Deploy to Dev
|
||||
runs-on: nas
|
||||
runs-on: ubuntu-latest
|
||||
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:
|
||||
- name: Checkout repository
|
||||
run: |
|
||||
@@ -251,7 +256,6 @@ jobs:
|
||||
|
||||
- name: Run smoke tests
|
||||
run: |
|
||||
cd /volume1/repos/nas-tools
|
||||
bash scripts/smoke-test-dashboard.sh dev
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "❌ Smoke tests failed! Check logs above."
|
||||
|
||||
@@ -58,7 +58,7 @@ fi
|
||||
|
||||
# Test 5: 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
|
||||
echo "✅ Container is healthy"
|
||||
else
|
||||
@@ -68,7 +68,7 @@ fi
|
||||
|
||||
# Test 6: Check recent logs for errors
|
||||
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
|
||||
echo "✅ No critical errors in recent logs ($ERROR_COUNT errors)"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user