Merge pull request #140 from trails-cool/fix/deploy-annotations-curl-dashboards

Fix deploy annotations: wget→curl + dashboard queries
This commit is contained in:
Ullrich Schäfer 2026-03-29 20:51:06 +02:00 committed by GitHub
commit af12837772
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 67 additions and 12 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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": [

View file

@ -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": [

View file

@ -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": [

View file

@ -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": [

View file

@ -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": [