#!/bin/bash # ✋ Do NOT install tools here — do that in the pipeline or main.sh # ❗ Fail if required env vars are not set : "${GIT_TOKEN:?GIT_TOKEN is not set}" : "${CLOUDFLARE_API_TOKEN:?CLOUDFLARE_API_TOKEN is not set}" : "${CLOUDFLARE_ZONE_ID:?CLOUDFLARE_ZONE_ID is not set}" # Repos SANDBOX_REPO_URL="https://git.dvirlabs.com/dvirlabs/sandbox.git" INFRA_REPO_URL="https://${GIT_TOKEN}@git.dvirlabs.com/dvirlabs/infra.git" # Paths SANDBOX_CLONE=".tmp-repos/sandbox" INFRA_CLONE=".tmp-repos/infra" # Generated files GENERATED_FILE="$(pwd)/generated-values/cloudflared-values.yaml" ORIGINAL_FILE="$INFRA_CLONE/manifests/cloudflared/values.yaml" MERGED_FILE="$INFRA_CLONE/manifests/cloudflared/values.yaml" # Cloudflare API CLOUDFLARE_API="https://api.cloudflare.com/client/v4" TARGET="b50bbf48-0a2f-47ce-b73e-336b6718318b.cfargotunnel.com"