From 711b5ff0db1d3557f762a695fcf5fc3a9779d47b Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Mon, 5 Jul 2021 12:49:48 +1000 Subject: [PATCH] feat: publish and deploy to apt.authelia.com (#2148) This automates the process of publishing our `*.deb` files for stable Authelia releases to apt.authelia.com. --- .buildkite/deployment.sh | 10 ++++ .buildkite/hooks/pre-command | 4 ++ .buildkite/steps/aptdeploy.sh | 14 +++++ .buildkite/steps/ghartifacts.sh | 4 +- README.md | 6 +++ docs/images/logos/balto.svg | 90 +++++++++++++++++++++++++++++++++ 6 files changed, 126 insertions(+), 2 deletions(-) create mode 100755 .buildkite/steps/aptdeploy.sh create mode 100644 docs/images/logos/balto.svg diff --git a/.buildkite/deployment.sh b/.buildkite/deployment.sh index 22f2e8952..7c88835a0 100755 --- a/.buildkite/deployment.sh +++ b/.buildkite/deployment.sh @@ -58,6 +58,16 @@ steps: depends_on: ~ if: build.tag != null || build.branch == "master" && build.env("CI_BYPASS") != "true" + - label: ":debian: :fedora: :ubuntu: Deploy APT" + command: "aptdeploy.sh" + depends_on: + - "build-deb-package-amd64" + - "build-deb-package-arm64" + - "build-deb-package-armhf" + agents: + upload: "fast" + if: build.tag != null + - label: ":book: Deploy Documentation" command: "syncdoc.sh" depends_on: ~ diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index fe0594acf..721dde6e6 100755 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -32,4 +32,8 @@ fi if [[ "${BUILDKITE_LABEL}" == ":github: Deploy Artifacts" ]]; then buildkite-agent artifact download "authelia-*.tar.gz*" . buildkite-agent artifact download "authelia_*.deb*" . +fi + +if [[ "${BUILDKITE_LABEL}" == ":debian: :fedora: :ubuntu: Deploy APT" ]]; then + buildkite-agent artifact download "authelia_*.deb" . fi \ No newline at end of file diff --git a/.buildkite/steps/aptdeploy.sh b/.buildkite/steps/aptdeploy.sh new file mode 100755 index 000000000..1980e0e32 --- /dev/null +++ b/.buildkite/steps/aptdeploy.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash + +for FILE in authelia_amd64.deb authelia_arm64.deb authelia_armhf.deb; do + mv ${FILE} ${FILE/authelia_/authelia_${BUILDKITE_TAG//v}-1_} +done + +for ARCH in amd64 arm64 armhf; do + echo "--- :debian: :fedora: :ubuntu: Deploy APT repository package for architecture: ${ARCH}" + curl -s -H "Authorization: Bearer ${BALTO_TOKEN}" \ + -F "distribution=all" \ + -F "readme=<$(echo README.md | sed -r 's/(\ **Authelia** can be installed as a standalone service from the [AUR](https://aur.archlinux.org/packages/authelia/), +[APT](https://apt.authelia.com/stable/debian/packages/authelia/), [FreeBSD Ports](https://svnweb.freebsd.org/ports/head/www/authelia/), or using a [Static binary](https://github.com/authelia/authelia/releases/latest), [.deb package]((https://github.com/authelia/authelia/releases/latest)), [Docker] or [Kubernetes] either manually or via @@ -299,6 +300,11 @@ Companies contributing to Authelia will have a specical mention below. [[Become +#### Balto + +Thank you to [Balto Balto](https://www.getbalto.com/) for +hosting our apt repository. + #### Digital Ocean Thank you to [Digital Ocean DigitalOcean](https://www.digitalocean.com/?from=Authelia) for diff --git a/docs/images/logos/balto.svg b/docs/images/logos/balto.svg new file mode 100644 index 000000000..69b2b2215 --- /dev/null +++ b/docs/images/logos/balto.svg @@ -0,0 +1,90 @@ + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + +