Merge authentication into Questions API
This commit is contained in:
@@ -91,6 +91,15 @@ jobs:
|
||||
--from-literal=webhook-secret="$STRIPE_WEBHOOK_SECRET" \
|
||||
--dry-run=client -o yaml | kubectl apply -n step3-questions -f -
|
||||
|
||||
- name: Configure authentication secrets
|
||||
env:
|
||||
AUTH_JWT_KEY: ${{ secrets.AUTH_JWT_KEY }}
|
||||
run: |
|
||||
test -n "$AUTH_JWT_KEY"
|
||||
kubectl create secret generic ranaze-auth \
|
||||
--from-literal=jwt-key="$AUTH_JWT_KEY" \
|
||||
--dry-run=client -o yaml | kubectl apply -n step3-questions -f -
|
||||
|
||||
- name: Apply Questions deployment & service
|
||||
run: |
|
||||
kubectl apply -f api/QuestionsApi/k8s/deployment.yaml -n step3-questions
|
||||
|
||||
@@ -68,6 +68,17 @@ jobs:
|
||||
|
||||
- name: Deploy Web game
|
||||
run: |
|
||||
for attempt in $(seq 1 30); do
|
||||
if curl -fsS --max-time 5 https://s3q.ranaze.com/api/Auth/legal >/dev/null; then
|
||||
echo "Merged authentication API is ready."
|
||||
break
|
||||
fi
|
||||
if [ "$attempt" -eq 30 ]; then
|
||||
echo "Merged authentication API did not become ready; preserving the current web deployment."
|
||||
exit 1
|
||||
fi
|
||||
sleep 10
|
||||
done
|
||||
kubectl create namespace step3-web --dry-run=client -o yaml | kubectl apply -f -
|
||||
kubectl apply -f web/k8s/service.yaml -n step3-web
|
||||
sed "s|step3-web:latest|step3-web:${BUILD_TAG}|" web/k8s/deployment.yaml | kubectl apply -n step3-web -f -
|
||||
|
||||
Reference in New Issue
Block a user