2026-01-10 12:34:31 +01:00
|
|
|
|
---
|
|
|
|
|
|
kind: secret
|
2026-01-10 21:31:22 +01:00
|
|
|
|
name: password_authelia
|
2026-01-10 12:34:31 +01:00
|
|
|
|
get:
|
2026-01-10 21:31:22 +01:00
|
|
|
|
path: secret/data/authelia/ssh
|
|
|
|
|
|
name: root
|
2026-01-10 12:34:31 +01:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
kind: secret
|
|
|
|
|
|
name: password_matrix
|
|
|
|
|
|
get:
|
|
|
|
|
|
path: secret/data/matrix/bot/drone-bot
|
|
|
|
|
|
name: password
|
|
|
|
|
|
---
|
|
|
|
|
|
kind: secret
|
|
|
|
|
|
name: userid_matrix
|
|
|
|
|
|
get:
|
|
|
|
|
|
path: secret/data/matrix/bot/drone-bot
|
|
|
|
|
|
name: userid
|
|
|
|
|
|
---
|
|
|
|
|
|
kind: secret
|
|
|
|
|
|
name: roomid_matrix
|
|
|
|
|
|
get:
|
|
|
|
|
|
path: secret/data/matrix/bot/drone-bot
|
|
|
|
|
|
name: roomid
|
|
|
|
|
|
|
2026-01-10 19:24:46 +01:00
|
|
|
|
---
|
|
|
|
|
|
kind: pipeline
|
2026-01-11 14:36:30 +01:00
|
|
|
|
type: docker
|
2026-01-10 22:22:33 +01:00
|
|
|
|
name: authelia_check
|
2026-01-10 19:24:46 +01:00
|
|
|
|
|
2026-01-10 22:11:16 +01:00
|
|
|
|
trigger:
|
|
|
|
|
|
event:
|
|
|
|
|
|
- pull_request
|
2026-01-10 22:13:51 +01:00
|
|
|
|
- push
|
2026-01-11 13:57:32 +01:00
|
|
|
|
- custom
|
|
|
|
|
|
- cron
|
2026-01-11 10:46:22 +01:00
|
|
|
|
|
2026-01-10 19:24:46 +01:00
|
|
|
|
steps:
|
2026-01-11 11:20:30 +01:00
|
|
|
|
- name: ssh-check
|
|
|
|
|
|
image: appleboy/drone-ssh
|
|
|
|
|
|
settings:
|
|
|
|
|
|
host: 10.0.4.18
|
|
|
|
|
|
username: root
|
|
|
|
|
|
password:
|
|
|
|
|
|
from_secret: password_authelia
|
|
|
|
|
|
port: 22
|
|
|
|
|
|
envs:
|
|
|
|
|
|
- args
|
2026-01-11 11:25:46 +01:00
|
|
|
|
- ARGS
|
2026-01-11 11:20:30 +01:00
|
|
|
|
- DRONE_BUILD_EVENT
|
|
|
|
|
|
script: |
|
2026-01-11 14:36:30 +01:00
|
|
|
|
export FINAL_ARGS=${args:-${ARGS:-}}
|
|
|
|
|
|
|
|
|
|
|
|
fetch -o /tmp/authelia-update.sh https://git.familie-berner.de/Open/infra-maintenance/raw/branch/main/authelia/authelia-update.sh
|
|
|
|
|
|
chmod +x /tmp/authelia-update.sh
|
|
|
|
|
|
|
|
|
|
|
|
set +e
|
|
|
|
|
|
timeout 10m /tmp/authelia-update.sh $FINAL_ARGS
|
|
|
|
|
|
EXIT_CODE=$?
|
|
|
|
|
|
set -e
|
2026-01-11 11:00:23 +01:00
|
|
|
|
|
2026-01-11 14:36:30 +01:00
|
|
|
|
case $EXIT_CODE in
|
|
|
|
|
|
0) MSG="✅ Update erfolgreich / Alles aktuell" ;;
|
|
|
|
|
|
10) MSG="ℹ Update verfügbar, aber nicht angewendet (--apply fehlt)" ;;
|
|
|
|
|
|
64) MSG="❌ Fehler: Ungültige Parameter" ;;
|
|
|
|
|
|
69) MSG="🌐 Fehler: Netzwerk/GitHub nicht erreichbar" ;;
|
|
|
|
|
|
70) MSG="📂 Fehler: Authelia Binary nicht gefunden" ;;
|
|
|
|
|
|
72) MSG="↩ Fehler: Kein Backup für Revert gefunden" ;;
|
|
|
|
|
|
75) MSG="🔥 KRITISCH: Dienst startet nicht! (Auto-Revert ggf. aktiv)" ;;
|
|
|
|
|
|
*) MSG="❓ Unbekannter Fehler (Code: $EXIT_CODE)" ;;
|
|
|
|
|
|
esac
|
2026-01-11 14:27:46 +01:00
|
|
|
|
|
2026-01-11 14:36:30 +01:00
|
|
|
|
echo "[INFO] Skript beendet mit: $MSG"
|
|
|
|
|
|
|
|
|
|
|
|
if [ $EXIT_CODE -ne 0 ] && [ $EXIT_CODE -ne 10 ]; then exit $EXIT_CODE; fi
|
2026-01-10 18:41:36 +01:00
|
|
|
|
|
2026-01-10 12:34:31 +01:00
|
|
|
|
---
|
|
|
|
|
|
kind: pipeline
|
2026-01-11 14:36:30 +01:00
|
|
|
|
type: docker
|
2026-01-10 12:34:31 +01:00
|
|
|
|
name: matrix_message
|
|
|
|
|
|
|
|
|
|
|
|
depends_on:
|
2026-01-11 14:30:56 +01:00
|
|
|
|
- authelia_check
|
2026-01-10 12:34:31 +01:00
|
|
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
|
|
status:
|
2026-01-11 14:27:46 +01:00
|
|
|
|
- success
|
2026-01-10 12:34:31 +01:00
|
|
|
|
- failure
|
|
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
|
- name: notify
|
|
|
|
|
|
image: spotlightkid/drone-matrixchat-notify
|
|
|
|
|
|
settings:
|
|
|
|
|
|
homeserver: 'https://matrix.familie-berner.de'
|
2026-01-11 14:36:30 +01:00
|
|
|
|
roomid:
|
|
|
|
|
|
from_secret: roomid_matrix
|
|
|
|
|
|
userid:
|
|
|
|
|
|
from_secret: userid_matrix
|
|
|
|
|
|
password:
|
|
|
|
|
|
from_secret: password_matrix
|
2026-01-10 12:34:31 +01:00
|
|
|
|
markdown: 'yes'
|
|
|
|
|
|
template: |
|
2026-01-11 14:27:46 +01:00
|
|
|
|
### Authelia Update Bericht
|
2026-01-11 14:45:02 +01:00
|
|
|
|
**Status:** ${DRONE_BUILD_STATUS}
|
|
|
|
|
|
**Event:** `${DRONE_BUILD_EVENT}`
|
|
|
|
|
|
**Build:** [#${DRONE_BUILD_NUMBER}](${DRONE_BUILD_LINK})
|
2026-01-10 12:34:31 +01:00
|
|
|
|
|
2026-01-11 14:27:46 +01:00
|
|
|
|
**Details:**
|
2026-01-11 14:45:02 +01:00
|
|
|
|
Der Build wurde mit dem Status **${DRONE_BUILD_STATUS}** beendet.
|
|
|
|
|
|
Bitte prüfe die Logs für Details zum Exit-Code des Skripts.
|
2026-01-10 18:46:49 +01:00
|
|
|
|
|
2026-01-11 14:45:02 +01:00
|
|
|
|
[Protokoll einsehen](${DRONE_BUILD_LINK})
|