Compare commits

...

43 commits

Author SHA1 Message Date
f
288a6acca2
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2024-10-29 11:52:23 -03:00
f
0e8b6ac71a
fix: move docker password to plugin config
https://github.com/woodpecker-ci/woodpecker/issues/4140#issuecomment-2369019247
2024-10-23 10:35:32 -03:00
f
fc1a12e592
fix: upgrade alpines 2024-09-14 17:25:35 -03:00
f
000ac53f39
feat: upgrades
https://alpinelinux.org/posts/Alpine-3.17.9-3.18.8-3.19.3-released.html

https://alpinelinux.org/posts/Alpine-3.20.2-released.html
2024-07-23 10:18:44 -03:00
f
ba79200e65
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2024-06-21 13:09:37 -03:00
f
41354bbc95
fix: deprecate MAINTAINER 2024-06-21 12:21:51 -03:00
f
c0e6b8150b
refactor: use matrix so it's easier to merge downstream containers 2024-06-19 10:15:44 -03:00
f
f7da597784
feat: upgrade 2024-06-19 10:14:59 -03:00
f
dfb6f210d3
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2024-05-23 15:52:19 -03:00
f
b99a8111d8
feat: 3.20 released 2024-05-22 10:20:38 -03:00
f
aa086a76af
BREAKING CHANGE: deprecate 3.16 2024-05-22 10:20:27 -03:00
f
2a72840be0
fix: 3.15 eol 2024-02-13 13:22:59 -03:00
f
397dff920a
fix: upgrade alpine 2024-02-13 13:22:45 -03:00
f
0e562d41fe
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
Some checks failed
ci/woodpecker/push/woodpecker/1 Pipeline failed
ci/woodpecker/push/woodpecker/2 Pipeline was successful
2023-12-12 15:23:41 -03:00
f
e66b364db7
ci: pipeline is deprecated 2023-12-12 13:36:48 -03:00
f
b921379aa0
feat: alpine 3.19 2023-12-07 10:22:26 -03:00
f
8dd7d4605a
fix: bad commit 2023-12-04 11:06:47 -03:00
f
d11e588f03
feat: alpine upgrades 2023-12-04 11:03:14 -03:00
f
72e0c22208
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-10-02 15:05:02 -03:00
f
5085c7e8df
feat: alpine 3.18.4 2023-09-28 12:24:44 -03:00
f
3163150be5
feat: send log to zulip
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-09-28 10:22:09 -03:00
f
91bf0bbe06
Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2023-09-28 10:18:20 -03:00
f
1233c89aff fix: use proper namespaces 2023-08-24 11:50:53 -03:00
f
5e098f58e9 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista 2023-08-10 11:46:17 -03:00
f
3dde92d4de BREAKING CHANGE: deprecate alpine 3.14 2023-08-08 11:18:21 -03:00
f
3e098e8c24 fix: upgrade alpines 2023-08-08 11:18:00 -03:00
f
582b83d3fa fix: 3.18.2 2023-06-15 12:37:11 -03:00
f
5d35cad642 feat: upgrade alpine
https://alpinelinux.org/posts/Alpine-3.15.9-3.16.6-3.17.4-3.18.2-released.html
2023-06-14 13:10:38 -03:00
f
d369aed22d fix: typo
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-05-20 14:09:51 -03:00
f
8b7dc40079 feat: output backup list
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-05-20 13:50:01 -03:00
f
1ec77166f8 fix: continue after failure 2023-05-20 13:49:48 -03:00
f
5b120ed353 fix: create the file if it doesn't exist
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-05-20 12:26:41 -03:00
f
5d34acde46 BREAKING CHANGE: deprecate alpine versions
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-05-20 12:06:00 -03:00
f
15d48f3d55 feat: known hosts 2023-05-20 12:05:39 -03:00
f
91958cf969 feat: forward ssh agent 2023-05-20 11:57:09 -03:00
f
eb02287940 Merge branch 'antifascista' of ssh://gitea.nulo.in:420/Sutty/containers-skel into antifascista
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
2023-05-10 13:14:32 -03:00
f
fedf64f2b9 feat: alpine 3.18 2023-05-10 12:41:25 -03:00
f
24c31e7eb8 fix: base registry 2023-04-04 18:03:51 -03:00
f
da19bd76f8 BREAKING CHANGE: use public gitea registry 2023-04-04 17:22:42 -03:00
f
1068b67884 feat: alpine upgrades 2023-03-29 16:32:41 -03:00
f
434501ef54 feat: alpine upgrade 2023-02-11 12:39:02 -03:00
f
dcf07f90e7 refactor: use strings 2023-01-14 16:09:32 -03:00
f
4aa380ee62 feat: alpine 3.17.1 2023-01-14 16:08:15 -03:00
4 changed files with 48 additions and 29 deletions

View file

@ -1,23 +1,24 @@
pipeline:
steps:
publish:
image: plugins/docker
image: "docker.io/woodpeckerci/plugin-docker-buildx"
settings:
registry: registry.nulo.in
username: sutty
repo: registry.nulo.in/sutty/borg
registry: "https://gitea.nulo.in"
username: "sutty"
repo: "gitea.nulo.in/sutty/borg"
tags:
- ${ALPINE_VERSION}
- latest
- "${ALPINE_VERSION}"
- "latest"
build_args:
- ALPINE_VERSION=${ALPINE_VERSION}
- BASE_IMAGE=registry.nulo.in/sutty/monit
secrets:
- docker_password
- "ALPINE_VERSION=${ALPINE_VERSION}"
- "BASE_IMAGE=gitea.nulo.in/sutty/monit"
password:
from_secret: "DOCKER_PASSWORD"
when:
branch: antifascista
event: push
branch: "antifascista"
event: "push"
matrix:
ALPINE_VERSION:
- 3.17.0
- 3.16.3
- 3.15.6
include:
- ALPINE_VERSION: "3.20.3"
- ALPINE_VERSION: "3.19.4"
- ALPINE_VERSION: "3.18.9"
- ALPINE_VERSION: "3.17.10"

View file

@ -1,7 +1,7 @@
ARG ALPINE_VERSION=3.13.6
ARG BASE_IMAGE=sutty/monit
ARG ALPINE_VERSION=3.18.3
ARG BASE_IMAGE=gitea.nulo.in/sutty/monit
FROM ${BASE_IMAGE}:${ALPINE_VERSION}
MAINTAINER "f <f@sutty.nl>"
LABEL org.opencontainers.image.authors="f@sutty.nl"
ENV BORG_HOST_ID borg
ENV BORG_PASSPHRASE ""
@ -11,7 +11,7 @@ ENV SSH_SERVER ""
ENV SSH_USER root
ENV SSH_PORT 22
RUN apk add --no-cache borgbackup openssh-client
RUN apk add --no-cache borgbackup openssh-client zulip-client
COPY ./monit.conf /etc/monit.d/borg.conf
COPY ./backup.sh /usr/local/bin/backup

View file

@ -1,19 +1,31 @@
#!/bin/sh
set -e
# Password can't be empty
test -n "${BORG_PASSPHRASE}"
test -n "${DEST}"
test -n "${SSH_ALIAS}"
# Defaults
SSH_PORT="${SSH_PORT:-22}"
SSH_SERVER="${SSH_SERVER:-${SSH_ALIAS}}"
SSH_USER="${SSH_USER:-root}"
umask 077
DATE="$(date +%F)"
ORIG=/srv/data
if ! grep -q "${SSH_ALIAS}" /root/.ssh/config ; then
echo "Host ${SSH_ALIAS}" >> /root/.ssh/config
echo " Port ${SSH_PORT:-22}" >> /root/.ssh/config
echo " HostName ${SSH_SERVER:-${SSH_ALIAS}}" >> /root/.ssh/config
echo " User ${SSH_USER:-root}" >> /root/.ssh/config
echo "Host ${SSH_ALIAS}" >> /root/.ssh/config
echo " Port ${SSH_PORT}" >> /root/.ssh/config
echo " HostName ${SSH_SERVER}" >> /root/.ssh/config
echo " User ${SSH_USER}" >> /root/.ssh/config
fi
touch /root/.ssh/known_hosts
if ! ssh-keygen -F "[${SSH_SERVER}]:${SSH_PORT}"; then
echo "${SSH_KNOWN_HOSTS}" >> /root/.ssh/known_hosts
fi
ssh -fN ${SSH_ALIAS}
@ -23,8 +35,13 @@ for signal in TERM QUIT HUP EXIT INT KILL; do
done
# It'll fail the second time
borg init --encryption=repokey "${SSH_ALIAS}:${DEST}" || :
borg create -v --stats "${SSH_ALIAS}:${DEST}::${DATE}" "${ORIG}"
borg prune -v --stats --keep-daily ${KEEP} "${SSH_ALIAS}:${DEST}"
borg init --encryption=repokey "${SSH_ALIAS}:${DEST}" 2>&1 | tee /tmp/backup.log
borg create -v --stats "${SSH_ALIAS}:${DEST}::${DATE}" "${ORIG}" 2>&1 | tee -a /tmp/backup.log
borg prune -v --stats --keep-daily ${KEEP} "${SSH_ALIAS}:${DEST}" 2>&1 | tee -a /tmp/backup.log
borg list "${SSH_ALIAS}:${DEST}" 2>&1 | tee -a /tmp/backup.log
if test -n "${ZULIP_KEY}"; then
cat /tmp/backup.log | zulip-client -u "${ZULIP_URL}" -b "${ZULIP_BOT}" -s "${ZULIP_STREAM}" -t "${ZULIP_TOPIC}"
fi
exit $?

View file

@ -5,3 +5,4 @@ Host *
VerifyHostKeyDNS yes
HashKnownHosts yes
StrictHostKeyChecking ask
ForwardAgent yes