upd
Some checks failed
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

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' settings:
environment: host: 10.0.4.18
MY_ARGS: username: root
from_env: args password:
settings: from_secret: password_authelia
host: 10.0.4.18 port: 22
username: root # Hier liegt der Schlüssel:
password: # Wir sagen dem Plugin, es soll die Variable 'args' (aus der UI)
from_secret: password_authelia # und 'DRONE_BUILD_EVENT' in die SSH-Session exportieren.
port: 22 envs:
command_timeout: 10m - args
# Wir sagen dem Plugin, es soll MY_ARGS mit über SSH nehmen - DRONE_BUILD_EVENT
envs: script: |
- MY_ARGS # In der SSH-Session ist die Variable nun so verfügbar,
- DRONE_BUILD_EVENT # wie du sie in der UI benannt hast.
script: | echo "[INFO] Event: $DRONE_BUILD_EVENT"
# Einfache Zuweisung ohne komplexe Syntax, um 'sh' Fehler zu vermeiden echo "[INFO] Parameter: $args"
echo "[INFO] Build event: $DRONE_BUILD_EVENT"
echo "[INFO] Inhalt von MY_ARGS: $MY_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' settings:
environment: host: 10.0.4.18
MY_ARGS: username: root
from_env: args password:
settings: from_secret: password_authelia
host: 10.0.4.18 port: 22
username: root # Hier liegt der Schlüssel:
password: # Wir sagen dem Plugin, es soll die Variable 'args' (aus der UI)
from_secret: password_authelia # und 'DRONE_BUILD_EVENT' in die SSH-Session exportieren.
port: 22 envs:
command_timeout: 10m - args
# Wir sagen dem Plugin, es soll MY_ARGS mit über SSH nehmen - DRONE_BUILD_EVENT
envs: script: |
- MY_ARGS # In der SSH-Session ist die Variable nun so verfügbar,
- DRONE_BUILD_EVENT # wie du sie in der UI benannt hast.
script: | echo "[INFO] Event: $DRONE_BUILD_EVENT"
# Einfache Zuweisung ohne komplexe Syntax, um 'sh' Fehler zu vermeiden echo "[INFO] Parameter: $args"
echo "[INFO] Build event: $DRONE_BUILD_EVENT"
echo "[INFO] Inhalt von MY_ARGS: $MY_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