39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
steps:
|
|
- name: helm-check
|
|
image: alpine/helm:3.13.2
|
|
commands:
|
|
- helm lint charts/grafana
|
|
- helm template charts/grafana -f manifest/grafana/values-int.yaml
|
|
|
|
- name: validate-manifest
|
|
image: bitnami/kubectl:latest
|
|
commands:
|
|
- echo "🔍 Validating grafana-int ArgoCD app"
|
|
- kubectl apply -f argocd-apps/grafana/grafana-int.yaml --dry-run=client
|
|
|
|
- name: deploy-argocd-app
|
|
image: bitnami/kubectl:latest
|
|
commands:
|
|
- echo "🚀 Applying grafana-int ArgoCD app"
|
|
- kubectl apply -f argocd-apps/grafana/grafana-int.yaml
|
|
|
|
- name: create-cloudflare-cname
|
|
image: alpine:latest
|
|
environment:
|
|
CLOUDFLARE_TOKEN: ${CLOUDFLARE_TOKEN}
|
|
CLOUDFLARE_ZONE_ID: ${CLOUDFLARE_ZONE_ID}
|
|
commands:
|
|
- apk add curl jq
|
|
- echo "🌐 Creating CNAME for grafana-int.dvirlabs.com"
|
|
- |
|
|
curl -X POST "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE_ID/dns_records" \
|
|
-H "Authorization: Bearer $CLOUDFLARE_TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
--data '{
|
|
"type": "CNAME",
|
|
"name": "grafana-int",
|
|
"content": "b50bbf48-0a2f-47ce-b73e-336b6718318b.cfargotunnel.com",
|
|
"ttl": 120,
|
|
"proxied": true
|
|
}'
|