Compare commits
2 commits
main
...
fix/deploy
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2a11397ca9 | ||
|
|
5cce5bc33b |
8 changed files with 67 additions and 12 deletions
8
.github/workflows/cd-apps.yml
vendored
8
.github/workflows/cd-apps.yml
vendored
|
|
@ -114,9 +114,9 @@ jobs:
|
||||||
# Annotate deploy in Grafana
|
# Annotate deploy in Grafana
|
||||||
GRAFANA_TOKEN=$(grep GRAFANA_SERVICE_TOKEN .env | cut -d= -f2- 2>/dev/null)
|
GRAFANA_TOKEN=$(grep GRAFANA_SERVICE_TOKEN .env | cut -d= -f2- 2>/dev/null)
|
||||||
if [ -n "$GRAFANA_TOKEN" ]; then
|
if [ -n "$GRAFANA_TOKEN" ]; then
|
||||||
docker compose exec -T grafana wget -q -O /dev/null \
|
docker compose exec -T grafana curl -sf -X POST \
|
||||||
--header="Authorization: Bearer $GRAFANA_TOKEN" \
|
-H "Authorization: Bearer $GRAFANA_TOKEN" \
|
||||||
--header="Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
--post-data='{"text":"Deploy '${{ github.sha }}'","tags":["deploy","apps"]}' \
|
-d '{"text":"Deploy ${{ github.sha }}","tags":["deploy","apps"]}' \
|
||||||
http://localhost:3000/api/annotations || true
|
http://localhost:3000/api/annotations || true
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
8
.github/workflows/cd-brouter.yml
vendored
8
.github/workflows/cd-brouter.yml
vendored
|
|
@ -68,9 +68,9 @@ jobs:
|
||||||
# Annotate deploy in Grafana
|
# Annotate deploy in Grafana
|
||||||
GRAFANA_TOKEN=$(grep GRAFANA_SERVICE_TOKEN .env | cut -d= -f2- 2>/dev/null)
|
GRAFANA_TOKEN=$(grep GRAFANA_SERVICE_TOKEN .env | cut -d= -f2- 2>/dev/null)
|
||||||
if [ -n "$GRAFANA_TOKEN" ]; then
|
if [ -n "$GRAFANA_TOKEN" ]; then
|
||||||
docker compose exec -T grafana wget -q -O /dev/null \
|
docker compose exec -T grafana curl -sf -X POST \
|
||||||
--header="Authorization: Bearer $GRAFANA_TOKEN" \
|
-H "Authorization: Bearer $GRAFANA_TOKEN" \
|
||||||
--header="Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
--post-data='{"text":"Deploy brouter ${{ github.sha }}","tags":["deploy","brouter"]}' \
|
-d '{"text":"Deploy brouter ${{ github.sha }}","tags":["deploy","brouter"]}' \
|
||||||
http://localhost:3000/api/annotations || true
|
http://localhost:3000/api/annotations || true
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
8
.github/workflows/cd-infra.yml
vendored
8
.github/workflows/cd-infra.yml
vendored
|
|
@ -89,9 +89,9 @@ jobs:
|
||||||
# Annotate deploy in Grafana
|
# Annotate deploy in Grafana
|
||||||
GRAFANA_TOKEN=$(grep GRAFANA_SERVICE_TOKEN .env | cut -d= -f2-)
|
GRAFANA_TOKEN=$(grep GRAFANA_SERVICE_TOKEN .env | cut -d= -f2-)
|
||||||
if [ -n "$GRAFANA_TOKEN" ]; then
|
if [ -n "$GRAFANA_TOKEN" ]; then
|
||||||
docker compose exec -T grafana wget -q -O /dev/null \
|
docker compose exec -T grafana curl -sf -X POST \
|
||||||
--header="Authorization: Bearer $GRAFANA_TOKEN" \
|
-H "Authorization: Bearer $GRAFANA_TOKEN" \
|
||||||
--header="Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
--post-data='{"text":"Deploy infra ${{ github.sha }}","tags":["deploy","infra"]}' \
|
-d '{"text":"Deploy infra ${{ github.sha }}","tags":["deploy","infra"]}' \
|
||||||
http://localhost:3000/api/annotations || true
|
http://localhost:3000/api/annotations || true
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,17 @@
|
||||||
{
|
{
|
||||||
"title": "Business Metrics",
|
"title": "Business Metrics",
|
||||||
"uid": "trails-business",
|
"uid": "trails-business",
|
||||||
|
"annotations": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"name": "Deploys",
|
||||||
|
"enable": true,
|
||||||
|
"datasource": { "type": "grafana", "uid": "-- Grafana --" },
|
||||||
|
"iconColor": "rgba(0, 211, 255, 1)",
|
||||||
|
"tags": ["deploy"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"timezone": "browser",
|
"timezone": "browser",
|
||||||
"refresh": "5m",
|
"refresh": "5m",
|
||||||
"panels": [
|
"panels": [
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,17 @@
|
||||||
"dashboard": {
|
"dashboard": {
|
||||||
"title": "Infrastructure",
|
"title": "Infrastructure",
|
||||||
"uid": "trails-infra",
|
"uid": "trails-infra",
|
||||||
|
"annotations": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"name": "Deploys",
|
||||||
|
"enable": true,
|
||||||
|
"datasource": { "type": "grafana", "uid": "-- Grafana --" },
|
||||||
|
"iconColor": "rgba(0, 211, 255, 1)",
|
||||||
|
"tags": ["deploy"]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"timezone": "browser",
|
"timezone": "browser",
|
||||||
"refresh": "30s",
|
"refresh": "30s",
|
||||||
"panels": [
|
"panels": [
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,17 @@
|
||||||
"dashboard": {
|
"dashboard": {
|
||||||
"title": "trails.cool Overview",
|
"title": "trails.cool Overview",
|
||||||
"uid": "trails-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",
|
"timezone": "browser",
|
||||||
"refresh": "30s",
|
"refresh": "30s",
|
||||||
"panels": [
|
"panels": [
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,17 @@
|
||||||
"dashboard": {
|
"dashboard": {
|
||||||
"title": "Planner",
|
"title": "Planner",
|
||||||
"uid": "trails-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",
|
"timezone": "browser",
|
||||||
"refresh": "30s",
|
"refresh": "30s",
|
||||||
"panels": [
|
"panels": [
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,17 @@
|
||||||
"dashboard": {
|
"dashboard": {
|
||||||
"title": "Service Health",
|
"title": "Service Health",
|
||||||
"uid": "trails-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",
|
"timezone": "browser",
|
||||||
"refresh": "30s",
|
"refresh": "30s",
|
||||||
"panels": [
|
"panels": [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue