linux_ws2122/.drone.yml

186 lines
3.8 KiB
YAML
Raw Normal View History

2021-10-13 17:25:16 +00:00
---
kind: pipeline
type: kubernetes
name: latest
2022-06-04 09:54:23 +00:00
node_selector:
kubernetes.io/arch: amd64
2021-10-13 17:25:16 +00:00
steps:
- name: build
commands:
- make latexmk/index.pdf
image: docker.io/volkerraschek/latex:latest-archlinux
resources:
2022-06-04 09:54:23 +00:00
requests:
cpu: 250
memory: 500M
2021-10-13 17:25:16 +00:00
limits:
cpu: 500
2022-06-04 09:54:23 +00:00
memory: 750M
2021-10-13 17:25:16 +00:00
- name: push-nextcloud
commands:
- curl --fail --user $WEBDAV_USER:$WEBDAV_PASSWORD --upload-file index.pdf --location https://nextcloud.cryptic.systems/remote.php/dav/files/markus.pesch/Dokumente/Studium/Fachschaftdaten/LX_-_Linux/linux_ws2122/Aufgabensammlung.pdf
depends_on:
- build
environment:
WEBDAV_USER:
from_secret: webdav_username
WEBDAV_PASSWORD:
from_secret: webdav_password
image: docker.io/volkerraschek/latex:latest-archlinux
resources:
limits:
2022-06-04 09:54:23 +00:00
cpu: 150
memory: 150M
2021-10-13 17:25:16 +00:00
- name: push-fhtrier
depends_on:
- build
image: docker.io/appleboy/drone-scp:1.6.2
settings:
host: ssh.hochschule-trier.de
user:
from_secret: ssh_user_fh-trier
key:
from_secret: ssh_key
port: 22
command_timeout: 2m
target:
- /dozenten/peschm/linux_ws2122
source:
- index.pdf
- csv/*
- sql/*
- name: email-notification
depends_on:
- push-nextcloud
- push-fhtrier
environment:
PLUGIN_HOST:
from_secret: smtp_host
PLUGIN_USERNAME:
from_secret: smtp_username
PLUGIN_PASSWORD:
from_secret: smtp_password
PLUGIN_FROM:
from_secret: smtp_mail_address
image: docker.io/drillster/drone-email:latest
resources:
limits:
2022-06-04 09:54:23 +00:00
cpu: 150
memory: 150M
2021-10-13 17:25:16 +00:00
when:
status:
- changed
- failure
trigger:
2021-10-13 17:30:13 +00:00
branch:
- master
2021-10-13 17:25:16 +00:00
event:
2021-10-13 17:30:13 +00:00
- cron
- push
repo:
- fh-trier/linux_ws2122
2021-10-13 17:25:16 +00:00
---
kind: pipeline
type: kubernetes
name: release
2022-06-04 09:54:23 +00:00
node_selector:
kubernetes.io/arch: amd64
2021-10-13 17:25:16 +00:00
steps:
- name: build
commands:
- make latexmk/index.pdf
environment:
VERSION: ${DRONE_TAG}
image: docker.io/volkerraschek/latex:latest-archlinux
resources:
2022-06-04 09:54:23 +00:00
requests:
cpu: 250
memory: 500M
2021-10-13 17:25:16 +00:00
limits:
cpu: 500
2022-06-04 09:54:23 +00:00
memory: 750M
2021-10-13 17:25:16 +00:00
- name: push-nextcloud
commands:
- curl --fail --user $WEBDAV_USER:$WEBDAV_PASSWORD --upload-file index.pdf --location https://nextcloud.cryptic.systems/remote.php/dav/files/markus.pesch/Dokumente/Studium/Fachschaftdaten/LX_-_Linux/linux_ws2122/Aufgabensammlung_${DRONE_TAG}.pdf
environment:
WEBDAV_USER:
from_secret: webdav_username
WEBDAV_PASSWORD:
from_secret: webdav_password
image: docker.io/volkerraschek/latex:latest-archlinux
resources:
limits:
2022-06-04 09:54:23 +00:00
cpu: 150
memory: 150M
2021-10-13 17:25:16 +00:00
- name: push-gitea
image: docker.io/plugins/gitea-release:latest
resources:
limits:
2022-06-04 09:54:23 +00:00
cpu: 150
memory: 150M
2021-10-13 17:25:16 +00:00
settings:
base_url: https://git.cryptic.systems
api_key:
from_secret: gitea_token
files:
- index.pdf
checksum:
- md5
- sha1
- sha256
- sha512
- adler32
- crc32
- name: email-notification
environment:
PLUGIN_HOST:
from_secret: smtp_host
PLUGIN_USERNAME:
from_secret: smtp_username
PLUGIN_PASSWORD:
from_secret: smtp_password
PLUGIN_FROM:
from_secret: smtp_mail_address
image: docker.io/drillster/drone-email:latest
resources:
limits:
2022-06-04 09:54:23 +00:00
cpu: 150
memory: 150M
2021-10-13 17:25:16 +00:00
when:
status:
- changed
- failure
2021-10-13 17:51:21 +00:00
- name: telegram-notifications
image: docker.io/appleboy/drone-telegram
settings:
token:
from_secret: telegram_token
to:
from_secret: telegram_group_id
document:
- index.pdf
message: >
Version {{ build.tag }} has been successfully released! Get the new
compiled PDF document via the network drive V or compile the document by
2021-10-13 18:03:41 +00:00
yourself. Take a look into the README for more details:
2021-10-13 17:51:21 +00:00
https://git.cryptic.systems/fh-trier/linux_ws2122
2021-10-13 17:25:16 +00:00
trigger:
event:
- tag
repo:
- fh-trier/linux_ws2122