Skip to content

Commit 31a5d91

Browse files
authored
Update ci-cd-user-api-docker-deploy.yml
1 parent 1361d06 commit 31a5d91

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

.github/workflows/ci-cd-user-api-docker-deploy.yml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,17 @@ jobs:
9999
kustomize build apps/user/deployment/overlays/development \
100100
| kubectl apply --wait -f -
101101
102+
- name: Wait for API pods to be ready
103+
run: |
104+
NAMESPACE="${{ secrets.K8S_NAMESPACE }}"
105+
kubectl wait --for=condition=ready pod -l app=user-api -n "$NAMESPACE" --timeout=180s
106+
102107
- name: Get deployed URL
103108
run: |
104-
# Use namespace from secret
105109
NAMESPACE="${{ secrets.K8S_NAMESPACE }}"
106-
107-
# Get Ambassador external IP
108110
HOST=$(kubectl get svc -n ambassador ambassador -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
109-
110-
# Get Mapping prefix
111-
PREFIX=$(kubectl get mapping treetracker-wallet-monorepo-user-api \
112-
-n "$NAMESPACE" \
113-
-o jsonpath='{.spec.prefix}')
114-
115-
# Combine
111+
PREFIX=$(kubectl get mapping treetracker-wallet-monorepo-user-api -n "$NAMESPACE" -o jsonpath='{.spec.prefix}')
116112
URL="http://$HOST$PREFIX"
117-
118-
echo "Deployed URL: $URL"
119-
120-
# Optional: set as workflow environment variable for later steps
113+
echo "✅ Deployed URL: $URL"
121114
echo "DEPLOYED_URL=$URL" >> $GITHUB_ENV
115+

0 commit comments

Comments
 (0)