Skip to content

Commit

Permalink
Hotfix to Deploy Only Pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
mhmdksh committed Nov 6, 2024
1 parent 20f1dae commit 902e3fe
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 58 deletions.
24 changes: 5 additions & 19 deletions .github/workflows/main-deploy-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
## Update each backend service one by one
## First Deployment
docker compose down qacc-be-graph-ql1
docker compose down qacc-be-job1
docker compose down qacc-be-job
docker compose up --force-recreate -d qacc-be-graph-ql1
docker compose up --force-recreate -d qacc-be-job1
docker compose up --force-recreate -d qacc-be-job
# Wait for qacc-be-graph-ql1 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql1 to become healthy..."
Expand All @@ -54,9 +54,9 @@ jobs:
echo "qacc-be-graph-ql1 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job1 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job1)" != "\"running\"" ]; then
echo "qacc-be-job1 is not running, stopping deployment"
# Check if qacc-be-job is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job)" != "\"running\"" ]; then
echo "qacc-be-job is not running, stopping deployment"
exit 1
fi
echo "First deployment phase completed successfully"
Expand All @@ -76,9 +76,7 @@ jobs:
cd QAcc-BE
## Second Deployment
docker compose down qacc-be-graph-ql2
docker compose down qacc-be-job2
docker compose up --force-recreate -d qacc-be-graph-ql2
docker compose up --force-recreate -d qacc-be-job2
# Wait for qacc-be-graph-ql2 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql2 to become healthy..."
Expand All @@ -92,11 +90,6 @@ jobs:
echo "qacc-be-graph-ql2 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job2 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job2)" != "\"running\"" ]; then
echo "qacc-be-job2 is not running, stopping deployment"
exit 1
fi
echo "Second deployment phase completed successfully"
rollout-deploy-3:
Expand All @@ -114,9 +107,7 @@ jobs:
cd QAcc-BE
## Third Deployment
docker compose down qacc-be-graph-ql3
docker compose down qacc-be-job3
docker compose up --force-recreate -d qacc-be-graph-ql3
docker compose up --force-recreate -d qacc-be-job3
# Wait for qacc-be-graph-ql3 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql3 to become healthy..."
Expand All @@ -130,9 +121,4 @@ jobs:
echo "qacc-be-graph-ql3 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job3 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job3)" != "\"running\"" ]; then
echo "qacc-be-job3 is not running, stopping deployment"
exit 1
fi
echo "First deployment phase completed successfully"
24 changes: 5 additions & 19 deletions .github/workflows/main-publish-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ jobs:
## Update each backend service one by one
## First Deployment
docker compose down qacc-be-graph-ql1
docker compose down qacc-be-job1
docker compose down qacc-be-job
docker compose up --force-recreate -d qacc-be-graph-ql1
docker compose up --force-recreate -d qacc-be-job1
docker compose up --force-recreate -d qacc-be-job
# Wait for qacc-be-graph-ql1 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql1 to become healthy..."
Expand All @@ -101,9 +101,9 @@ jobs:
echo "qacc-be-graph-ql1 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job1 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job1)" != "\"running\"" ]; then
echo "qacc-be-job1 is not running, stopping deployment"
# Check if qacc-be-job is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job)" != "\"running\"" ]; then
echo "qacc-be-job is not running, stopping deployment"
exit 1
fi
echo "First deployment phase completed successfully"
Expand All @@ -123,9 +123,7 @@ jobs:
cd QAcc-BE
## Second Deployment
docker compose down qacc-be-graph-ql2
docker compose down qacc-be-job2
docker compose up --force-recreate -d qacc-be-graph-ql2
docker compose up --force-recreate -d qacc-be-job2
# Wait for qacc-be-graph-ql2 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql2 to become healthy..."
Expand All @@ -139,11 +137,6 @@ jobs:
echo "qacc-be-graph-ql2 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job2 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job2)" != "\"running\"" ]; then
echo "qacc-be-job2 is not running, stopping deployment"
exit 1
fi
echo "Second deployment phase completed successfully"
rollout-deploy-3:
Expand All @@ -161,9 +154,7 @@ jobs:
cd QAcc-BE
## Third Deployment
docker compose down qacc-be-graph-ql3
docker compose down qacc-be-job3
docker compose up --force-recreate -d qacc-be-graph-ql3
docker compose up --force-recreate -d qacc-be-job3
# Wait for qacc-be-graph-ql3 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql3 to become healthy..."
Expand All @@ -177,9 +168,4 @@ jobs:
echo "qacc-be-graph-ql3 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job3 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job3)" != "\"running\"" ]; then
echo "qacc-be-job3 is not running, stopping deployment"
exit 1
fi
echo "First deployment phase completed successfully"
24 changes: 5 additions & 19 deletions .github/workflows/staging-deploy-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
## Update each backend service one by one
## First Deployment
docker compose down qacc-be-graph-ql1
docker compose down qacc-be-job1
docker compose down qacc-be-job
docker compose up --force-recreate -d qacc-be-graph-ql1
docker compose up --force-recreate -d qacc-be-job1
docker compose up --force-recreate -d qacc-be-job
# Wait for qacc-be-graph-ql1 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql1 to become healthy..."
Expand All @@ -54,9 +54,9 @@ jobs:
echo "qacc-be-graph-ql1 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job1 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job1)" != "\"running\"" ]; then
echo "qacc-be-job1 is not running, stopping deployment"
# Check if qacc-be-job is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job)" != "\"running\"" ]; then
echo "qacc-be-job is not running, stopping deployment"
exit 1
fi
echo "First deployment phase completed successfully"
Expand All @@ -76,9 +76,7 @@ jobs:
cd QAcc-BE
## Second Deployment
docker compose down qacc-be-graph-ql2
docker compose down qacc-be-job2
docker compose up --force-recreate -d qacc-be-graph-ql2
docker compose up --force-recreate -d qacc-be-job2
# Wait for qacc-be-graph-ql2 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql2 to become healthy..."
Expand All @@ -92,11 +90,6 @@ jobs:
echo "qacc-be-graph-ql2 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job2 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job2)" != "\"running\"" ]; then
echo "qacc-be-job2 is not running, stopping deployment"
exit 1
fi
echo "Second deployment phase completed successfully"
rollout-deploy-3:
Expand All @@ -114,9 +107,7 @@ jobs:
cd QAcc-BE
## Third Deployment
docker compose down qacc-be-graph-ql3
docker compose down qacc-be-job3
docker compose up --force-recreate -d qacc-be-graph-ql3
docker compose up --force-recreate -d qacc-be-job3
# Wait for qacc-be-graph-ql3 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql3 to become healthy..."
Expand All @@ -130,9 +121,4 @@ jobs:
echo "qacc-be-graph-ql3 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job3 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job3)" != "\"running\"" ]; then
echo "qacc-be-job3 is not running, stopping deployment"
exit 1
fi
echo "First deployment phase completed successfully"
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ services:
- '4003:4000'

qacc-be-job:
container_name: qacc-be-job1
container_name: qacc-be-job
image: ${DOCKER_IMAGE}
command: npm run start:docker:server-job
environment:
Expand Down

0 comments on commit 902e3fe

Please sign in to comment.