From 49b78cf10f85a10dd006c5b80dce8c05c77446e4 Mon Sep 17 00:00:00 2001 From: Andreas Mieke Date: Sat, 13 Jan 2024 03:14:36 +0100 Subject: [PATCH 1/2] feat(platforms): Add ARM support --- .woodpecker.yml | 63 ++++++++++++++++++++++++++-------------------- Dockerfile | 3 +-- README.md | 13 +++------- docker-compose.yml | 2 +- 4 files changed, 41 insertions(+), 40 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 5cd8b9e..75acfa0 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -1,30 +1,39 @@ ---- -variables: - - &kaniko_plugin 'plugins/kaniko:1.6' - -matrix: - include: - - BASE: bookworm-slim - TAGS: '[ "bookwork", "1.2", "1.2.2" ]' - - BASE: bullseye-slim - TAGS: '[ "bullseye", "latest", "1.1.16" ]' - - BASE: buster-slim - TAGS: '[ "buster", "1.1.9" ]' - -pipeline: +steps: build: - image: *kaniko_plugin - group: build + image: woodpeckerci/plugin-docker-buildx settings: - repo: nold360/borgserver - dockerfile: Dockerfile - build_args: - - BASE_IMAGE=debian:${BASE} - tags: ${TAGS} - username: - from_secret: docker_username - password: - from_secret: docker_password + dry-run: true + repo: git.merp.digital/${CI_REPO_OWNER}/borgserver + platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x + registry: git.merp.digital when: - - branch: master - - event: cron + - event: push + branch: + exclude: [develop, master] + + publish-nightly: + image: woodpeckerci/plugin-docker-buildx + settings: + repo: git.merp.digital/${CI_REPO_OWNER}/borgserver + platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x + registry: git.merp.digital + tags: develop-${CI_COMMIT_SHA} + username: ${CI_REPO_OWNER} + password: + from_secret: cb_token + when: + - event: push + branch: develop + + publish-release: + image: woodpeckerci/plugin-docker-buildx + settings: + repo: git.merp.digital/${CI_REPO_OWNER}/borgserver + platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x + registry: git.merp.digital + tags: ${CI_COMMIT_TAG} + username: ${CI_REPO_OWNER} + password: + from_secret: cb_token + when: + - event: tag \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index a7cd5d1..893a84c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,7 @@ # Dockerfile to build borgbackup server images # Based on Debian ############################################################ -ARG BASE_IMAGE=debian:bullseye-slim -FROM $BASE_IMAGE +FROM debian:12.4-slim # Volume for SSH-Keys VOLUME /sshkeys diff --git a/README.md b/README.md index 5b4defd..2ae399d 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ docker run -td \ -p 2222:22 \ --volume ./borg/sshkeys:/sshkeys \ --volume ./borg/backup:/backup \ - nold360/borgserver:latest + git.merp.digital/eranmorkon/borgserver:1.0.0 ``` @@ -45,7 +45,7 @@ See the the documentation for all available arguments: [borgbackup.readthedocs.i ##### Example ``` -docker run --rm -e BORG_SERVE_ARGS="--progress --debug" (...) nold360/borgserver +docker run --rm -e BORG_SERVE_ARGS="--progress --debug" (...) git.merp.digital/eranmorkon/borgserver ``` #### BORG_APPEND_ONLY @@ -62,7 +62,7 @@ To declare a client as admin, set this variable to the name of the client/sshkey ##### Example ``` -docker run --rm -e BORG_APPEND_ONLY="yes" -e BORG_ADMIN="nolds_notebook" (...) nold360/borgserver +docker run --rm -e BORG_APPEND_ONLY="yes" -e BORG_ADMIN="nolds_notebook" (...) git.merp.digital/eranmorkon/borgserver ``` To prune repos from another client, you have to add the path to the repository in the clients directory: @@ -132,10 +132,3 @@ And create your first backup! ``` $ borg create backup:my_first_borg_repo::documents-2017-11-01 /home/user/MyImportentDocs ``` - -## Tags - -All images are freshly built every week & published as `nold360/borgserver` with the following tags: - - Next / Unstable [borg 1.2.0]: `bookworm`, `1.2.0` - - Latest / Stable [borg 1.1.16]: `bullseye`, `1.1.16`, `latest` - - Legacy / Buster [borg 1.1.9 ]: `buster`, `1.1.9` diff --git a/docker-compose.yml b/docker-compose.yml index e66b4cd..6557ab3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3' services: borgserver: - image: nold360/borgserver + image: git.merp.digital/eranmorkon/borgserver #build: . volumes: - ./backup:/backup From 397f800372c87d8ea45b682f4762da78a5842943 Mon Sep 17 00:00:00 2001 From: Andreas Mieke Date: Sat, 13 Jan 2024 03:17:42 +0100 Subject: [PATCH 2/2] fix(platforms): Remove useless platforms --- .woodpecker.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.woodpecker.yml b/.woodpecker.yml index 75acfa0..b765cde 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -4,7 +4,7 @@ steps: settings: dry-run: true repo: git.merp.digital/${CI_REPO_OWNER}/borgserver - platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x + platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64/v8 registry: git.merp.digital when: - event: push @@ -15,7 +15,7 @@ steps: image: woodpeckerci/plugin-docker-buildx settings: repo: git.merp.digital/${CI_REPO_OWNER}/borgserver - platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x + platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64/v8 registry: git.merp.digital tags: develop-${CI_COMMIT_SHA} username: ${CI_REPO_OWNER} @@ -29,7 +29,7 @@ steps: image: woodpeckerci/plugin-docker-buildx settings: repo: git.merp.digital/${CI_REPO_OWNER}/borgserver - platforms: linux/386,linux/amd64,linux/arm/v5,linux/arm/v7,linux/arm64/v8,linux/mips64le,linux/ppc64le,linux/s390x + platforms: linux/386,linux/amd64,linux/arm/v7,linux/arm64/v8 registry: git.merp.digital tags: ${CI_COMMIT_TAG} username: ${CI_REPO_OWNER}