From 87be96db6709a9dcd52355ac4c629bec505f8c92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Sun, 29 Mar 2026 20:44:39 +0200 Subject: [PATCH 1/2] Switch deploy annotations from BusyBox wget to curl BusyBox wget in the Grafana Alpine container doesn't support --post-data/--header. Grafana's image includes curl. Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/workflows/cd-apps.yml | 8 ++++---- .github/workflows/cd-brouter.yml | 8 ++++---- .github/workflows/cd-infra.yml | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/cd-apps.yml b/.github/workflows/cd-apps.yml index 9fb0fa6..24ab70f 100644 --- a/.github/workflows/cd-apps.yml +++ b/.github/workflows/cd-apps.yml @@ -114,9 +114,9 @@ jobs: # Annotate deploy in Grafana GRAFANA_TOKEN=$(grep GRAFANA_SERVICE_TOKEN .env | cut -d= -f2- 2>/dev/null) if [ -n "$GRAFANA_TOKEN" ]; then - docker compose exec -T grafana wget -q -O /dev/null \ - --header="Authorization: Bearer $GRAFANA_TOKEN" \ - --header="Content-Type: application/json" \ - --post-data='{"text":"Deploy '${{ github.sha }}'","tags":["deploy","apps"]}' \ + docker compose exec -T grafana curl -sf -X POST \ + -H "Authorization: Bearer $GRAFANA_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{"text":"Deploy ${{ github.sha }}","tags":["deploy","apps"]}' \ http://localhost:3000/api/annotations || true fi diff --git a/.github/workflows/cd-brouter.yml b/.github/workflows/cd-brouter.yml index 3ef953d..3efef07 100644 --- a/.github/workflows/cd-brouter.yml +++ b/.github/workflows/cd-brouter.yml @@ -68,9 +68,9 @@ jobs: # Annotate deploy in Grafana GRAFANA_TOKEN=$(grep GRAFANA_SERVICE_TOKEN .env | cut -d= -f2- 2>/dev/null) if [ -n "$GRAFANA_TOKEN" ]; then - docker compose exec -T grafana wget -q -O /dev/null \ - --header="Authorization: Bearer $GRAFANA_TOKEN" \ - --header="Content-Type: application/json" \ - --post-data='{"text":"Deploy brouter ${{ github.sha }}","tags":["deploy","brouter"]}' \ + docker compose exec -T grafana curl -sf -X POST \ + -H "Authorization: Bearer $GRAFANA_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{"text":"Deploy brouter ${{ github.sha }}","tags":["deploy","brouter"]}' \ http://localhost:3000/api/annotations || true fi diff --git a/.github/workflows/cd-infra.yml b/.github/workflows/cd-infra.yml index eb6450a..fd295f0 100644 --- a/.github/workflows/cd-infra.yml +++ b/.github/workflows/cd-infra.yml @@ -89,9 +89,9 @@ jobs: # Annotate deploy in Grafana GRAFANA_TOKEN=$(grep GRAFANA_SERVICE_TOKEN .env | cut -d= -f2-) if [ -n "$GRAFANA_TOKEN" ]; then - docker compose exec -T grafana wget -q -O /dev/null \ - --header="Authorization: Bearer $GRAFANA_TOKEN" \ - --header="Content-Type: application/json" \ - --post-data='{"text":"Deploy infra ${{ github.sha }}","tags":["deploy","infra"]}' \ + docker compose exec -T grafana curl -sf -X POST \ + -H "Authorization: Bearer $GRAFANA_TOKEN" \ + -H "Content-Type: application/json" \ + -d '{"text":"Deploy infra ${{ github.sha }}","tags":["deploy","infra"]}' \ http://localhost:3000/api/annotations || true fi From fcfea209b884c9346790b75e8d2e85861cb3809e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Sun, 29 Mar 2026 20:47:56 +0200 Subject: [PATCH 2/2] Add deploy annotation query to all Grafana dashboards Provisioned dashboards now display deploy markers (cyan vertical lines) by querying built-in Grafana annotations tagged "deploy". Co-Authored-By: Claude Opus 4.6 (1M context) --- infrastructure/grafana/dashboards/business.json | 11 +++++++++++ infrastructure/grafana/dashboards/infrastructure.json | 11 +++++++++++ infrastructure/grafana/dashboards/overview.json | 11 +++++++++++ infrastructure/grafana/dashboards/planner.json | 11 +++++++++++ infrastructure/grafana/dashboards/service-health.json | 11 +++++++++++ 5 files changed, 55 insertions(+) diff --git a/infrastructure/grafana/dashboards/business.json b/infrastructure/grafana/dashboards/business.json index 8d29c53..9b8c934 100644 --- a/infrastructure/grafana/dashboards/business.json +++ b/infrastructure/grafana/dashboards/business.json @@ -1,6 +1,17 @@ { "title": "Business Metrics", "uid": "trails-business", + "annotations": { + "list": [ + { + "name": "Deploys", + "enable": true, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, + "iconColor": "rgba(0, 211, 255, 1)", + "tags": ["deploy"] + } + ] + }, "timezone": "browser", "refresh": "5m", "panels": [ diff --git a/infrastructure/grafana/dashboards/infrastructure.json b/infrastructure/grafana/dashboards/infrastructure.json index 9afe4fc..cc4ba04 100644 --- a/infrastructure/grafana/dashboards/infrastructure.json +++ b/infrastructure/grafana/dashboards/infrastructure.json @@ -2,6 +2,17 @@ "dashboard": { "title": "Infrastructure", "uid": "trails-infra", + "annotations": { + "list": [ + { + "name": "Deploys", + "enable": true, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, + "iconColor": "rgba(0, 211, 255, 1)", + "tags": ["deploy"] + } + ] + }, "timezone": "browser", "refresh": "30s", "panels": [ diff --git a/infrastructure/grafana/dashboards/overview.json b/infrastructure/grafana/dashboards/overview.json index df6abcc..f43f8ff 100644 --- a/infrastructure/grafana/dashboards/overview.json +++ b/infrastructure/grafana/dashboards/overview.json @@ -2,6 +2,17 @@ "dashboard": { "title": "trails.cool Overview", "uid": "trails-overview", + "annotations": { + "list": [ + { + "name": "Deploys", + "enable": true, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, + "iconColor": "rgba(0, 211, 255, 1)", + "tags": ["deploy"] + } + ] + }, "timezone": "browser", "refresh": "30s", "panels": [ diff --git a/infrastructure/grafana/dashboards/planner.json b/infrastructure/grafana/dashboards/planner.json index c248ba7..eed9bdf 100644 --- a/infrastructure/grafana/dashboards/planner.json +++ b/infrastructure/grafana/dashboards/planner.json @@ -2,6 +2,17 @@ "dashboard": { "title": "Planner", "uid": "trails-planner", + "annotations": { + "list": [ + { + "name": "Deploys", + "enable": true, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, + "iconColor": "rgba(0, 211, 255, 1)", + "tags": ["deploy"] + } + ] + }, "timezone": "browser", "refresh": "30s", "panels": [ diff --git a/infrastructure/grafana/dashboards/service-health.json b/infrastructure/grafana/dashboards/service-health.json index c5d68cb..e9a936b 100644 --- a/infrastructure/grafana/dashboards/service-health.json +++ b/infrastructure/grafana/dashboards/service-health.json @@ -2,6 +2,17 @@ "dashboard": { "title": "Service Health", "uid": "trails-service-health", + "annotations": { + "list": [ + { + "name": "Deploys", + "enable": true, + "datasource": { "type": "grafana", "uid": "-- Grafana --" }, + "iconColor": "rgba(0, 211, 255, 1)", + "tags": ["deploy"] + } + ] + }, "timezone": "browser", "refresh": "30s", "panels": [