diff --git a/.drone.yml b/.drone.yml index 4fc23d0..607a572 100644 --- a/.drone.yml +++ b/.drone.yml @@ -45,14 +45,22 @@ steps: port: 22 command_timeout: 10m script: | - set -e + set -eu + + ARGS="" + if [ -n "${DRONE_BUILD_PARAMS:-}" ]; then + ARGS=$(echo "$DRONE_BUILD_PARAMS" | sed -n 's/.*"args"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p') + fi 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 - timeout 5m /tmp/authelia-update.sh + echo "[INFO] Build event: ${DRONE_BUILD_EVENT}" + echo "[INFO] Args: ${ARGS:-}" + + timeout 10m /tmp/authelia-update.sh $ARGS --- kind: pipeline @@ -79,15 +87,20 @@ steps: script: | set -eu + ARGS="" + if [ -n "${DRONE_BUILD_PARAMS:-}" ]; then + ARGS=$(echo "$DRONE_BUILD_PARAMS" | sed -n 's/.*"args"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p') + fi + 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 echo "[INFO] Build event: ${DRONE_BUILD_EVENT}" - echo "[INFO] Args: ${DRONE_CUSTOM_ARGS:-}" + echo "[INFO] Args: ${ARGS:-}" - timeout 10m /tmp/authelia-update.sh ${DRONE_CUSTOM_ARGS} + timeout 10m /tmp/authelia-update.sh $ARGS --- kind: pipeline