Skip to content

Commit 5d37c2c

Browse files
committed
cicd build
1 parent 0d5fdbe commit 5d37c2c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,16 @@ jobs:
6767
6868
- name: Deploy to EKS
6969
run: |
70-
if ! kubectl get deployment ${{ vars.DEPLOYMENT_NAME }} -n default &> /dev/null; then
70+
# Check if the deployment exists
71+
kubectl get deployment ${{ vars.DEPLOYMENT_NAME }} -n default &> /dev/null
72+
if [ $? -ne 0 ]; then
7173
echo "Deployment does not exist. Creating..."
7274
kubectl create deployment ${{ vars.DEPLOYMENT_NAME }} --image=${{ vars.IMAGE_REGISTRY }}:$LATEST_SHA -n default
7375
else
7476
echo "Deployment exists. Updating..."
7577
kubectl set image deployment/${{ vars.DEPLOYMENT_NAME }} ${{ vars.DEPLOYMENT_NAME }}=${{ vars.IMAGE_REGISTRY }}:$LATEST_SHA -n default
7678
fi
79+
80+
- name: Verify Deployment
81+
run: |
82+
kubectl rollout status deployment/${{ vars.DEPLOYMENT_NAME }} -n default

0 commit comments

Comments
 (0)