Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions k8s/deployment/notify_active_domains
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -euo pipefail

DOMAINS=$(echo "$CONTEXT" | jq .scope.domains)

if [[ "$DOMAINS" == "null" || "$DOMAINS" == "[]" ]]; then
return
fi

echo "$DOMAINS" | jq -r '.[] | "\(.id)|\(.name)"' | while IFS='|' read -r domain_id domain_name; do
echo "Configuring domain: $domain_name"

np scope domain patch --id "$domain_id" --body '{"status": "active"}'

echo "Successfully configured domain: $domain_name"
done
16 changes: 11 additions & 5 deletions k8s/deployment/workflows/initial.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,14 @@ steps:
ACTION: apply
DRY_RUN: false
post:
name: wait deployment active
type: script
file: "$SERVICE_PATH/deployment/wait_deployment_active"
configuration:
TIMEOUT: DEPLOYMENT_MAX_WAIT_IN_SECONDS
name: deployment_checks
type: workflow
steps:
- name: notify_active_domains
type: script
file: "$SERVICE_PATH/deployment/notify_active_domains"
- name: wait deployment active
type: script
file: "$SERVICE_PATH/deployment/wait_deployment_active"
configuration:
TIMEOUT: DEPLOYMENT_MAX_WAIT_IN_SECONDS