upd
continuous-integration/drone/push Build is passing
continuous-integration/drone Build was killed

This commit is contained in:
2026-01-11 11:20:30 +01:00
parent 310cee3e6a
commit e324601689
+26 -30
View File
@@ -35,72 +35,68 @@ trigger:
- push - push
steps: steps:
- name: ssh-check - name: ssh-check
image: appleboy/drone-ssh image: appleboy/drone-ssh
# Hier mappen wir den UI-Parameter 'args' fest auf eine Variable 'MY_ARGS'
environment:
MY_ARGS:
from_env: args
settings: settings:
host: 10.0.4.18 host: 10.0.4.18
username: root username: root
password: password:
from_secret: password_authelia from_secret: password_authelia
port: 22 port: 22
command_timeout: 10m # Hier liegt der Schlüssel:
# Wir sagen dem Plugin, es soll MY_ARGS mit über SSH nehmen # Wir sagen dem Plugin, es soll die Variable 'args' (aus der UI)
# und 'DRONE_BUILD_EVENT' in die SSH-Session exportieren.
envs: envs:
- MY_ARGS - args
- DRONE_BUILD_EVENT - DRONE_BUILD_EVENT
script: | script: |
# Einfache Zuweisung ohne komplexe Syntax, um 'sh' Fehler zu vermeiden # In der SSH-Session ist die Variable nun so verfügbar,
echo "[INFO] Build event: $DRONE_BUILD_EVENT" # wie du sie in der UI benannt hast.
echo "[INFO] Inhalt von MY_ARGS: $MY_ARGS" echo "[INFO] Event: $DRONE_BUILD_EVENT"
echo "[INFO] Parameter: $args"
fetch -o /tmp/authelia-update.sh \ fetch -o /tmp/authelia-update.sh https://git.familie-berner.de/Open/infra-maintenance/raw/branch/main/authelia/authelia-update.sh
https://git.familie-berner.de/Open/infra-maintenance/raw/branch/main/authelia/authelia-update.sh
chmod +x /tmp/authelia-update.sh chmod +x /tmp/authelia-update.sh
# Skript mit dem Parameter aus MY_ARGS ausführen # Ausführen. Falls $args leer ist, passiert nichts Schlimmes.
timeout 10m /tmp/authelia-update.sh $MY_ARGS /tmp/authelia-update.sh $args
--- ---
kind: pipeline kind: pipeline
type: docker
name: authelia_apply name: authelia_apply
trigger: trigger:
event: event:
- custom - custom
- cron
steps: steps:
- name: ssh-check - name: ssh-check
image: appleboy/drone-ssh image: appleboy/drone-ssh
# Hier mappen wir den UI-Parameter 'args' fest auf eine Variable 'MY_ARGS'
environment:
MY_ARGS:
from_env: args
settings: settings:
host: 10.0.4.18 host: 10.0.4.18
username: root username: root
password: password:
from_secret: password_authelia from_secret: password_authelia
port: 22 port: 22
command_timeout: 10m # Hier liegt der Schlüssel:
# Wir sagen dem Plugin, es soll MY_ARGS mit über SSH nehmen # Wir sagen dem Plugin, es soll die Variable 'args' (aus der UI)
# und 'DRONE_BUILD_EVENT' in die SSH-Session exportieren.
envs: envs:
- MY_ARGS - args
- DRONE_BUILD_EVENT - DRONE_BUILD_EVENT
script: | script: |
# Einfache Zuweisung ohne komplexe Syntax, um 'sh' Fehler zu vermeiden # In der SSH-Session ist die Variable nun so verfügbar,
echo "[INFO] Build event: $DRONE_BUILD_EVENT" # wie du sie in der UI benannt hast.
echo "[INFO] Inhalt von MY_ARGS: $MY_ARGS" echo "[INFO] Event: $DRONE_BUILD_EVENT"
echo "[INFO] Parameter: $args"
fetch -o /tmp/authelia-update.sh \ fetch -o /tmp/authelia-update.sh https://git.familie-berner.de/Open/infra-maintenance/raw/branch/main/authelia/authelia-update.sh
https://git.familie-berner.de/Open/infra-maintenance/raw/branch/main/authelia/authelia-update.sh
chmod +x /tmp/authelia-update.sh chmod +x /tmp/authelia-update.sh
# Skript mit dem Parameter aus MY_ARGS ausführen # Ausführen. Falls $args leer ist, passiert nichts Schlimmes.
timeout 10m /tmp/authelia-update.sh $MY_ARGS /tmp/authelia-update.sh $args
--- ---
kind: pipeline kind: pipeline