Files
infra-maintenance/.drone.yml
matthiasberner 75856b1bbb
Some checks failed
continuous-integration/drone/push Build is failing
.drone.yml aktualisiert
2026-01-10 21:57:26 +01:00

132 lines
2.3 KiB
YAML

---
kind: secret
name: password_authelia
get:
path: secret/data/authelia/ssh
name: root
---
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
---
kind: pipeline
type: ssh
name: authelia_check
clone:
disable: true
server:
host: 10.0.4.18
user: root
password:
from_secret: password_authelia
steps:
- name: check_authelia_update
commands:
- |
set -e
fetch -o /tmp/authelia-update.sh \
https://git.familie-berner.de/Open/infra-maintenance/src/branch/main/authelia/authelia-update.sh
chmod +x /tmp/authelia-update.sh
timeout 5m /tmp/authelia-update.sh
---
kind: pipeline
name: check_authelia
steps:
- name: ssh-check
image: appleboy/drone-ssh
settings:
host: 10.0.4.18
username: root
password:
from_secret: password_authelia
port: 22
command_timeout: 10s
script:
- timeout 5m sh -s < authelia/authelia-update.sh
---
kind: pipeline
type: ssh
name: authelia_apply
clone:
image: alpine/git
server:
host: 10.0.4.18
user: root
password:
from_secret: password_authelia
steps:
- name: apply_authelia_update
commands:
- timeout 10m sh -s -- --apply --auto-revert < authelia/authelia-update.sh
---
kind: pipeline
name: matrix_message
depends_on:
- authelia_check
- authelia_apply
trigger:
status:
- success
- failure
steps:
- name: notify
image: spotlightkid/drone-matrixchat-notify
settings:
homeserver: 'https://matrix.familie-berner.de'
roomid:
from_secret: roomid_matrix
userid:
from_secret: userid_matrix
password:
from_secret: password_matrix
markdown: 'yes'
template: |
**Authelia Update**
repo: `${DRONE_REPO}`
branch: `${DRONE_BRANCH}`
build: `#${DRONE_BUILD_NUMBER}`
status: **${DRONE_BUILD_STATUS}**
event: `${DRONE_BUILD_EVENT}`
commit: ${DRONE_COMMIT_LINK}
pr: `${DRONE_PULL_REQUEST}`
${DRONE_PULL_REQUEST_TITLE}
when:
branch:
- master
- main