From 93e20a44e982fd094c59ef6a11668bf528f7af66 Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Sat, 26 Jun 2021 11:45:21 +1000 Subject: [PATCH] feat: build and distribute .deb packages (#2114) * feat: build and distribute .deb packages Creates .deb packages for distribution via GitHub releases and Buildkite builds for the following architectures: * amd64 * armhf * arm64 * fix: pkgver reference in debpackages.sh * refactor: split deb packaging jobs and quote variables * fix: pipeline upload for debpackages * fix: depends_on key for debpackages * fix: add depends_on: ~ for debpackages step * fix: pre-artifact hook for debpackages * fix: add .deb suffix in pre-artifact hook * fix: variable reference in debhelper.sh * refactor: silence wget output in debhelper.sh * refactor: make build concurrency gate only depend_on docker builds * refactor: make build concurrency gate also depend_on coverage build * refactor: remove dependencies for build concurrency gate --- .buildkite/annotations/artifacts | 12 ++++++++--- .buildkite/deployment.sh | 9 +++++--- .buildkite/hooks/post-checkout | 8 +++---- .buildkite/hooks/post-command | 24 ++++++++++----------- .buildkite/hooks/pre-artifact | 26 ++++++++++++++++------- .buildkite/hooks/pre-command | 21 ++++++++++++------- .buildkite/hooks/pre-exit | 2 +- .buildkite/pipeline.sh | 29 ++++++++++++++++++++++--- .buildkite/steps/aurhelper.sh | 16 +++++++------- .buildkite/steps/buildimages.sh | 11 +--------- .buildkite/steps/debhelper.sh | 26 +++++++++++++++++++++++ .buildkite/steps/debpackages.sh | 36 ++++++++++++++++++++++++++++++++ .buildkite/steps/e2etests.sh | 11 +--------- .buildkite/steps/ghartifacts.sh | 12 ++++++++++- README.md | 5 ++--- 15 files changed, 175 insertions(+), 73 deletions(-) create mode 100755 .buildkite/steps/debhelper.sh create mode 100755 .buildkite/steps/debpackages.sh diff --git a/.buildkite/annotations/artifacts b/.buildkite/annotations/artifacts index b9aad80b8..c4d3e9ba2 100644 --- a/.buildkite/annotations/artifacts +++ b/.buildkite/annotations/artifacts @@ -4,21 +4,27 @@
amd64
authelia-linux-amd64.tar.gz
- authelia-linux-amd64.tar.gz.sha256 + authelia-linux-amd64.tar.gz.sha256
+ authelia_amd64.deb
+ authelia_amd64.deb.sha256
arm32v7
authelia-linux-arm32v7.tar.gz
- authelia-linux-arm32v7.tar.gz.sha256 + authelia-linux-arm32v7.tar.gz.sha256
+ authelia_armhf.deb
+ authelia_armhf.deb.sha256
arm64v8
authelia-linux-arm64v8.tar.gz
- authelia-linux-arm64v8.tar.gz.sha256 + authelia-linux-arm64v8.tar.gz.sha256
+ authelia_arm64.deb
+ authelia_arm64.deb.sha256
diff --git a/.buildkite/deployment.sh b/.buildkite/deployment.sh index ad79b3f00..22f2e8952 100755 --- a/.buildkite/deployment.sh +++ b/.buildkite/deployment.sh @@ -3,9 +3,9 @@ set -u DIVERGED=$(git merge-base --fork-point origin/master > /dev/null; echo $?) -if [[ $DIVERGED == 0 ]]; then - if [[ $BUILDKITE_TAG == "" ]]; then - if [[ $BUILDKITE_BRANCH == "master" ]]; then +if [[ "${DIVERGED}" == 0 ]]; then + if [[ "${BUILDKITE_TAG}" == "" ]]; then + if [[ "${BUILDKITE_BRANCH}" == "master" ]]; then CI_BYPASS=$(git diff --name-only HEAD~1 | sed -rn '/^(CONTRIBUTING.md|README.md|SECURITY.md|\.all-contributorsrc|\.github\/.*|docs\/.*)/!{q1}' && echo true || echo false) else CI_BYPASS=$(git diff --name-only `git merge-base --fork-point origin/master` | sed -rn '/^(CONTRIBUTING.md|README.md|SECURITY.md|\.all-contributorsrc|\.github\/.*|docs\/.*)/!{q1}' && echo true || echo false) @@ -43,6 +43,9 @@ steps: - "build-docker-linux-amd64" - "build-docker-linux-arm32v7" - "build-docker-linux-arm64v8" + - "build-deb-package-amd64" + - "build-deb-package-armhf" + - "build-deb-package-arm64" retry: automatic: true agents: diff --git a/.buildkite/hooks/post-checkout b/.buildkite/hooks/post-checkout index 8c77838d7..7c86bf24a 100755 --- a/.buildkite/hooks/post-checkout +++ b/.buildkite/hooks/post-checkout @@ -4,14 +4,14 @@ set +u git fetch -q -if [[ ! $BUILDKITE_COMMAND =~ "buildkite-agent pipeline upload" ]] || \ -[[ $BUILDKITE_COMMAND == ".buildkite/steps/e2etests.sh | buildkite-agent pipeline upload" ]]; then +if [[ ! "${BUILDKITE_COMMAND}" =~ "buildkite-agent pipeline upload" ]] || \ +[[ "${BUILDKITE_COMMAND}" == ".buildkite/steps/e2etests.sh | buildkite-agent pipeline upload" ]]; then echo "--- :buildkite: Setting up Build environment" source bootstrap.sh - if [[ $BUILDKITE_COMMAND == "authelia-scripts --log-level debug ci" ]]; then + if [[ "${BUILDKITE_COMMAND}" == "authelia-scripts --log-level debug ci" ]]; then go mod download fi - if [[ $BUILDKITE_LABEL =~ ":selenium:" ]]; then + if [[ "${BUILDKITE_LABEL}" =~ ":selenium:" ]]; then go mod download fi fi \ No newline at end of file diff --git a/.buildkite/hooks/post-command b/.buildkite/hooks/post-command index 65e96ef0e..f8278b7a5 100755 --- a/.buildkite/hooks/post-command +++ b/.buildkite/hooks/post-command @@ -2,28 +2,28 @@ set +u -if [[ $BUILDKITE_PULL_REQUEST != "false" ]]; then - if [[ $BUILDKITE_LABEL == ":service_dog: Linting" ]]; then +if [[ "${BUILDKITE_PULL_REQUEST}" != "false" ]]; then + if [[ "${BUILDKITE_LABEL}" == ":service_dog: Linting" ]]; then echo "--- :go::service_dog: Provide in-line commentary for pull request" reviewdog -reporter=github-pr-review fi fi -if [[ ! $BUILDKITE_BRANCH =~ ^(v.*) ]] && [[ $BUILDKITE_COMMAND_EXIT_STATUS == 0 ]]; then - if [[ $BUILDKITE_LABEL == ":hammer_and_wrench: Unit Test" ]] || [[ $BUILDKITE_LABEL =~ ":selenium:" ]]; then +if [[ ! "${BUILDKITE_BRANCH}" =~ ^(v.*) ]] && [[ "${BUILDKITE_COMMAND_EXIT_STATUS}" == 0 ]]; then + if [[ "${BUILDKITE_LABEL}" == ":hammer_and_wrench: Unit Test" ]] || [[ "${BUILDKITE_LABEL}" =~ ":selenium:" ]]; then echo "--- :codecov: Upload coverage reports" - if [[ $BUILDKITE_AGENT_META_DATA_CODECOV == "verbose" ]]; then + if [[ "${BUILDKITE_AGENT_META_DATA_CODECOV}" == "verbose" ]]; then BUILDKITE_AGENT_META_DATA_CODECOV="-v" fi - bash <(curl -s --connect-timeout 10 --retry 10 --retry-max-time 0 https://codecov.io/bash) -Z -c -s 'coverage*.txt' -F backend ${BUILDKITE_AGENT_META_DATA_CODECOV} - if [[ $BUILDKITE_LABEL =~ ":selenium:" ]]; then + bash <(curl -s --connect-timeout 10 --retry 10 --retry-max-time 0 https://codecov.io/bash) -Z -c -s 'coverage*.txt' -F backend "${BUILDKITE_AGENT_META_DATA_CODECOV}" + if [[ "${BUILDKITE_LABEL}" =~ ":selenium:" ]]; then cd web && yarn report fi - bash <(curl -s --connect-timeout 10 --retry 10 --retry-max-time 0 https://codecov.io/bash) -Z -c -f '!*.go' -f '!*.zst' -F frontend ${BUILDKITE_AGENT_META_DATA_CODECOV} + bash <(curl -s --connect-timeout 10 --retry 10 --retry-max-time 0 https://codecov.io/bash) -Z -c -f '!*.go' -f '!*.zst' -F frontend "${BUILDKITE_AGENT_META_DATA_CODECOV}" fi fi -if [[ $BUILDKITE_LABEL =~ ":selenium:" ]] || [[ $BUILDKITE_LABEL =~ ":docker: Build Image" ]]; then +if [[ "${BUILDKITE_LABEL}" =~ ":selenium:" ]] || [[ "${BUILDKITE_LABEL}" =~ ":docker: Build Image" ]]; then CONTAINERS=$(docker ps -a -q) if [[ ${CONTAINERS} != "" ]]; then echo "--- :docker: Remove lingering containers" @@ -31,16 +31,16 @@ if [[ $BUILDKITE_LABEL =~ ":selenium:" ]] || [[ $BUILDKITE_LABEL =~ ":docker: Bu fi fi -if [[ $BUILDKITE_LABEL == ":docker: Image Deployments" ]]; then +if [[ "${BUILDKITE_LABEL}" == ":docker: Image Deployments" ]]; then cat .buildkite/annotations/artifacts | buildkite-agent annotate --style "success" --context "ctx-success" fi -if [[ $BUILDKITE_LABEL =~ ":docker: Deploy" ]]; then +if [[ "${BUILDKITE_LABEL}" =~ ":docker: Deploy" ]]; then docker logout docker logout ghcr.io fi -if [[ $BUILDKITE_LABEL == ":docker: Deploy Manifests" ]] && [[ $BUILDKITE_BRANCH == "master" ]] && [[ $BUILDKITE_PULL_REQUEST == "false" ]]; then +if [[ "${BUILDKITE_LABEL}" == ":docker: Deploy Manifests" ]] && [[ "${BUILDKITE_BRANCH}" == "master" ]] && [[ "${BUILDKITE_PULL_REQUEST}" == "false" ]]; then echo "--- :docker: Removing tags for deleted branches" anontoken=$(curl -fsL --retry 3 'https://auth.docker.io/token?service=registry.docker.io&scope=repository:authelia/authelia:pull' | jq -r .token) authtoken=$(curl -fs --retry 3 -H "Content-Type: application/json" -X "POST" -d '{"username": "'${DOCKER_USERNAME}'", "password": "'${DOCKER_PASSWORD}'"}' https://hub.docker.com/v2/users/login/ | jq -r .token) diff --git a/.buildkite/hooks/pre-artifact b/.buildkite/hooks/pre-artifact index f2b230d89..86c916e66 100755 --- a/.buildkite/hooks/pre-artifact +++ b/.buildkite/hooks/pre-artifact @@ -4,21 +4,33 @@ set +u DOCKER_IMAGE=authelia/authelia -if [[ $BUILDKITE_LABEL == ":hammer_and_wrench: Unit Test" ]]; then +if [[ "${BUILDKITE_LABEL}" == ":hammer_and_wrench: Unit Test" ]]; then tar -czf authelia-public_html.tar.gz -C dist public_html sha256sum authelia-public_html.tar.gz > authelia-public_html.tar.gz.sha256 fi -if [[ $BUILDKITE_LABEL =~ ":docker: Build Image" ]]; then +if [[ "${BUILDKITE_LABEL}" =~ ":docker: Build Image" ]]; then echo "--- :docker: Saving artifacts for :buildkite: :docker: :github: releases" # Save binary for buildkite and github artifacts if [[ "${ARCH}" != "coverage" ]]; then - docker create --name authelia-binary ${DOCKER_IMAGE}:latest - docker cp authelia-binary:/app/authelia ./authelia-"${OS}"-"${ARCH}" + docker create --name authelia-binary "${DOCKER_IMAGE}:latest" + docker cp authelia-binary:/app/authelia "./authelia-${OS}-${ARCH}" docker rm -f authelia-binary - tar -czf authelia-"${OS}"-"${ARCH}".tar.gz authelia-"${OS}"-"${ARCH}" authelia.service config.template.yml - sha256sum authelia-"${OS}"-"${ARCH}".tar.gz > authelia-"${OS}"-"${ARCH}".tar.gz.sha256 + tar -czf "authelia-${OS}-${ARCH}.tar.gz" "authelia-${OS}-${ARCH}" authelia.service config.template.yml + sha256sum "authelia-${OS}-${ARCH}.tar.gz" > "authelia-${OS}-${ARCH}.tar.gz.sha256" fi # Saving image for push to docker hub - docker save ${DOCKER_IMAGE} | zstdmt -T0 -12 > authelia-image-"${ARCH}".tar.zst + docker save "${DOCKER_IMAGE}" | zstdmt -T0 -12 > "authelia-image-${ARCH}.tar.zst" +fi + +if [[ "${BUILDKITE_LABEL}" =~ ":debian: Build Package" ]]; then + if [[ "${BUILDKITE_TAG}" != "" ]]; then + echo "--- :debian: Saving artifacts for :github: release" + for f in *.deb; do mv "$f" "$(echo "$f" | sed s/${BUILDKITE_TAG//v}-1_//)"; done + else + echo "--- :debian: Saving artifacts for :buildkite: release" + VERSION=$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g') + for f in *.deb; do mv "$f" "$(echo "$f" | sed s/${VERSION}-1_//)"; done + fi + sha256sum "authelia_${PACKAGE}.deb" > "authelia_${PACKAGE}.deb.sha256" fi \ No newline at end of file diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 399bd8ed4..fe0594acf 100755 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -2,29 +2,34 @@ set +u -if [[ $BUILDKITE_LABEL == ":service_dog: Linting" ]]; then +if [[ "${BUILDKITE_LABEL}" == ":service_dog: Linting" ]]; then cd web && yarn install && cd ../ fi -if [[ $BUILDKITE_LABEL =~ ":selenium:" ]]; then +if [[ "${BUILDKITE_LABEL}" =~ ":selenium:" ]]; then DEFAULT_ARCH=coverage echo "--- :docker: Extract, load and tag build container" buildkite-agent artifact download "authelia-image-${DEFAULT_ARCH}*" . - zstdcat authelia-image-${DEFAULT_ARCH}.tar.zst | docker load + zstdcat "authelia-image-${DEFAULT_ARCH}.tar.zst" | docker load docker tag authelia/authelia authelia:dist fi -if [[ $BUILDKITE_LABEL =~ ":docker: Build Image" ]] && [[ "${ARCH}" != "coverage" ]]; then +if [[ "${BUILDKITE_LABEL}" =~ ":docker: Build Image" ]] && [[ "${ARCH}" != "coverage" ]]; then echo "--- :react: :swagger: Extract frontend assets" buildkite-agent artifact download "authelia-public_html.tar.gz" . tar xzf authelia-public_html.tar.gz fi -if [[ $BUILDKITE_LABEL =~ ":docker: Deploy Image" ]]; then - buildkite-agent artifact download "authelia-image-${ARCH}*" . - zstdcat authelia-image-"${ARCH}".tar.zst | docker load +if [[ "${BUILDKITE_LABEL}" =~ ":debian: Build Package" ]]; then + buildkite-agent artifact download "authelia-linux-${ARCH}.tar.gz" . fi -if [[ $BUILDKITE_LABEL == ":github: Deploy Artifacts" ]]; then +if [[ "${BUILDKITE_LABEL}" =~ ":docker: Deploy Image" ]]; then + buildkite-agent artifact download "authelia-image-${ARCH}*" . + zstdcat "authelia-image-${ARCH}.tar.zst" | docker load +fi + +if [[ "${BUILDKITE_LABEL}" == ":github: Deploy Artifacts" ]]; then buildkite-agent artifact download "authelia-*.tar.gz*" . + buildkite-agent artifact download "authelia_*.deb*" . fi \ No newline at end of file diff --git a/.buildkite/hooks/pre-exit b/.buildkite/hooks/pre-exit index 169152b8f..d5c6a60ef 100755 --- a/.buildkite/hooks/pre-exit +++ b/.buildkite/hooks/pre-exit @@ -2,7 +2,7 @@ set +u -if [[ $BUILDKITE_AGENT_META_DATA_CLEANBUILD != "false" ]]; then +if [[ "${BUILDKITE_AGENT_META_DATA_CLEANBUILD}" != "false" ]]; then echo "--- :docker: Clean environment" docker system prune -af --volumes fi \ No newline at end of file diff --git a/.buildkite/pipeline.sh b/.buildkite/pipeline.sh index ebc9b3579..d432c218d 100755 --- a/.buildkite/pipeline.sh +++ b/.buildkite/pipeline.sh @@ -3,9 +3,9 @@ set -u DIVERGED=$(git merge-base --fork-point origin/master > /dev/null; echo $?) -if [[ $DIVERGED == 0 ]]; then - if [[ $BUILDKITE_TAG == "" ]]; then - if [[ $BUILDKITE_BRANCH == "master" ]]; then +if [[ "${DIVERGED}" == 0 ]]; then + if [[ "${BUILDKITE_TAG}" == "" ]]; then + if [[ "${BUILDKITE_BRANCH}" == "master" ]]; then CI_BYPASS=$(git diff --name-only HEAD~1 | sed -rn '/^(CONTRIBUTING.md|README.md|SECURITY.md|\.all-contributorsrc|\.github\/.*|docs\/.*)/!{q1}' && echo true || echo false) else CI_BYPASS=$(git diff --name-only `git merge-base --fork-point origin/master` | sed -rn '/^(CONTRIBUTING.md|README.md|SECURITY.md|\.all-contributorsrc|\.github\/.*|docs\/.*)/!{q1}' && echo true || echo false) @@ -52,6 +52,20 @@ steps: depends_on: ~ if: build.env("CI_BYPASS") != "true" + - label: ":debian: Package Builds" + command: ".buildkite/steps/debpackages.sh | buildkite-agent pipeline upload" + depends_on: ~ + if: build.env("CI_BYPASS") != "true" + + - wait: + if: build.env("CI_BYPASS") != "true" + + - label: ":vertical_traffic_light: Build Concurrency Gate" + command: "echo End of concurrency gate" + concurrency: 3 + concurrency_group: "builds" + if: build.env("CI_BYPASS") != "true" + - wait: if: build.branch !~ /^(v[0-9]+\.[0-9]+\.[0-9]+)$\$/ && build.env("CI_BYPASS") != "true" @@ -62,4 +76,13 @@ steps: depends_on: - "build-docker-linux-coverage" if: build.branch !~ /^(v[0-9]+\.[0-9]+\.[0-9]+)$\$/ && build.env("CI_BYPASS") != "true" + + - wait: + if: build.env("CI_BYPASS") != "true" + + - label: ":vertical_traffic_light: Test Concurrency Gate" + command: "echo End of concurrency gate" + concurrency: 3 + concurrency_group: "tests" + if: build.env("CI_BYPASS") != "true" EOF \ No newline at end of file diff --git a/.buildkite/steps/aurhelper.sh b/.buildkite/steps/aurhelper.sh index f57b9931c..99560429a 100755 --- a/.buildkite/steps/aurhelper.sh +++ b/.buildkite/steps/aurhelper.sh @@ -1,4 +1,4 @@ -#! /usr/bin/env bash +#!/usr/bin/env bash GITTAG=$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g') @@ -6,20 +6,20 @@ echo "--- :linux: Deploy AUR package: ${PACKAGE}" git clone ssh://aur@aur.archlinux.org/"${PACKAGE}".git cd "${PACKAGE}" || exit -if [[ $PACKAGE != "authelia-git" ]]; then - sed -i "/pkgver=/c\pkgver=${BUILDKITE_TAG//v/}" PKGBUILD && \ - sed -i "/pkgrel=/c\pkgrel=1" PKGBUILD && \ +if [[ "${PACKAGE}" != "authelia-git" ]]; then + sed -i -e "/pkgver=/c pkgver=${BUILDKITE_TAG//v/}" \ + -e '/pkgrel=/c pkgrel=1' PKGBUILD && \ docker run --rm -v $PWD:/build authelia/aurpackager bash -c "cd /build && updpkgsums" else - sed -i "/pkgver=/c\pkgver=${GITTAG}" PKGBUILD && \ - sed -i "/pkgrel=/c\pkgrel=1" PKGBUILD + sed -i -e "/pkgver=/c pkgver=${GITTAG}" \ + -e '/pkgrel=/c pkgrel=1' PKGBUILD fi docker run --rm -v $PWD:/build authelia/aurpackager bash -c "cd /build && makepkg --printsrcinfo >| .SRCINFO" && \ git add . && \ -if [[ $PACKAGE != "authelia-git" ]]; then +if [[ "${PACKAGE}" != "authelia-git" ]]; then git commit -m "Update to ${BUILDKITE_TAG}" else git commit -m "Update to GIT version: ${GITTAG}" fi -git push \ No newline at end of file +git push diff --git a/.buildkite/steps/buildimages.sh b/.buildkite/steps/buildimages.sh index c031e0392..53d5cf68c 100755 --- a/.buildkite/steps/buildimages.sh +++ b/.buildkite/steps/buildimages.sh @@ -37,13 +37,4 @@ cat << EOF EOF fi done -done -cat << EOF - - - wait - - - label: ":vertical_traffic_light: Build Concurrency Gate" - command: "echo End of concurrency gate" - concurrency: 3 - concurrency_group: "builds" -EOF \ No newline at end of file +done \ No newline at end of file diff --git a/.buildkite/steps/debhelper.sh b/.buildkite/steps/debhelper.sh new file mode 100755 index 000000000..a01cdfc8a --- /dev/null +++ b/.buildkite/steps/debhelper.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash + +GITTAG=$(git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g') + +if [[ "${BUILDKITE_TAG}" == "" ]]; then + VERSION="pkgver=${GITTAG}" +else + VERSION="pkgver=${BUILDKITE_TAG//v/}" +fi + +wget https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=authelia-bin -qO PKGBUILD && \ +sed -i -e '/^pkgname=/c pkgname=authelia' -e "/pkgver=/c $VERSION" -e '10,14d' \ +-e 's/source_x86_64.*/source_x86_64=("authelia-linux-amd64.tar.gz")/' \ +-e 's/source_aarch64.*/source_aarch64=("authelia-linux-arm64v8.tar.gz")/' \ +-e 's/source_armv7h.*/source_armv7h=("authelia-linux-arm32v7.tar.gz")/' \ +-e 's/sha256sums_x86_64.*/sha256sums_x86_64=("SKIP")/' \ +-e 's/sha256sums_aarch64.*/sha256sums_aarch64=("SKIP")/' \ +-e 's/sha256sums_armv7h.*/sha256sums_armv7h=("SKIP")/' PKGBUILD + +if [[ "${PACKAGE}" == "amd64" ]]; then + docker run --rm -v $PWD:/build authelia/aurpackager bash -c "cd /build && makedeb" +elif [[ "${PACKAGE}" == "armhf" ]]; then + docker run --rm -v $PWD:/build nightah/debpackager:armhf bash -c "cd /build && makedeb" +else + docker run --rm -v $PWD:/build nightah/debpackager:arm64 bash -c "cd /build && makedeb" +fi diff --git a/.buildkite/steps/debpackages.sh b/.buildkite/steps/debpackages.sh new file mode 100755 index 000000000..a805f1a8c --- /dev/null +++ b/.buildkite/steps/debpackages.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +set -eu + +for DEB_PACKAGE in amd64 armhf arm64; do +cat << EOF + - label: ":debian: Build Package [${DEB_PACKAGE}]" + command: "debhelper.sh" + artifact_paths: + - "*.deb" + - "*.deb.sha256" + env: + PACKAGE: "${DEB_PACKAGE}" +EOF +if [[ "${DEB_PACKAGE}" == "amd64" ]]; then +cat << EOF + ARCH: "${DEB_PACKAGE}" + depends_on: + - "build-docker-linux-amd64" +EOF +elif [[ "${DEB_PACKAGE}" == "armhf" ]]; then +cat << EOF + ARCH: "arm32v7" + depends_on: + - "build-docker-linux-arm32v7" +EOF +else +cat << EOF + ARCH: "arm64v8" + depends_on: + - "build-docker-linux-arm64v8" +EOF +fi +cat << EOF + key: "build-deb-package-${DEB_PACKAGE}" +EOF +done \ No newline at end of file diff --git a/.buildkite/steps/e2etests.sh b/.buildkite/steps/e2etests.sh index 326a5c576..7195187fd 100755 --- a/.buildkite/steps/e2etests.sh +++ b/.buildkite/steps/e2etests.sh @@ -29,13 +29,4 @@ cat << EOF suite: "all" EOF fi -done -cat << EOF - - - wait - - - label: ":vertical_traffic_light: Test Concurrency Gate" - command: "echo End of concurrency gate" - concurrency: 3 - concurrency_group: "tests" -EOF \ No newline at end of file +done \ No newline at end of file diff --git a/.buildkite/steps/ghartifacts.sh b/.buildkite/steps/ghartifacts.sh index 50af9d413..2db18102d 100755 --- a/.buildkite/steps/ghartifacts.sh +++ b/.buildkite/steps/ghartifacts.sh @@ -14,10 +14,20 @@ do artifacts+=(-a "${FILE/authelia-/authelia-${BUILDKITE_TAG}-}") done +for FILE in \ + authelia_amd64.deb authelia_amd64.deb.sha256 \ + authelia_arm64.deb authelia_arm64.deb.sha256 \ + authelia_armhf.deb authelia_armhf.deb.sha256; +do + # Add the version to the artifact name + mv $FILE ${FILE/authelia_/authelia_${BUILDKITE_TAG}_} + artifacts+=(-a "${FILE/authelia_/authelia_${BUILDKITE_TAG}_}") +done + echo "--- :github: Deploy artifacts for release: ${BUILDKITE_TAG}" hub release create "${BUILDKITE_TAG}" "${artifacts[@]}" -F <(echo -e "${BUILDKITE_TAG}\n$(conventional-changelog -p angular -o /dev/stdout -r 2 | sed -e '1,3d')\n\n### Docker Container\n* \`docker pull authelia/authelia:${BUILDKITE_TAG//v}\`\n* \`docker pull ghcr.io/authelia/authelia:${BUILDKITE_TAG//v}\`"); EXIT=$? -if [[ $EXIT == 0 ]]; +if [[ "${EXIT}" == 0 ]]; then exit else diff --git a/README.md b/README.md index 2f40cbffc..161b94550 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,8 @@ The following is a simple diagram of the architecture: **Authelia** can be installed as a standalone service from the [AUR](https://aur.archlinux.org/packages/authelia/), [FreeBSD Ports](https://svnweb.freebsd.org/ports/head/www/authelia/), or using a -[Static binary](https://github.com/authelia/authelia/releases/latest), [Docker] or [Kubernetes] either manually or via +[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 the Helm [Chart](https://charts.authelia.com) (beta) leveraging ingress controllers and ingress configurations.

@@ -38,8 +39,6 @@ the Helm [Chart](https://charts.authelia.com) (beta) leveraging ingress controll

-***Help Wanted:*** Assistance to publish a [Debian package](https://github.com/authelia/authelia/issues/573) would be greatly appreciated. - Here is what Authelia's portal looks like: