authelia/.buildkite/steps/debpackages.sh
Amir Zarrinkafsh 92ec00d7c5
feat: builds with gox and buildx (#2381)
* feat: builds with gox and buildx

This change builds all of Authelia respective binaries in parallel within a single step and distributes as necessary to subsequent steps, we now also build and distribute for the following OS/Architecture: freebsd/amd64.

Our CI/CD pipeline now also utilises docker buildx as a default for builds and pushes.

* refactor: clean up docker helper

* Remove `authelia-scripts docker push-image` command as all pushes will be performed with buildx and manifests
* Rename the --arch flag to --container
* Add Dockerfile.dev for users that want to build an Authelia container from source without utilising suites
* Set Dockerfile.dev as default for `authelia-scripts docker build` command

* refactor: variant -> container
2021-09-16 22:39:18 +10:00

32 lines
573 B
Bash
Executable File

#!/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}"
EOF
elif [[ "${DEB_PACKAGE}" == "armhf" ]]; then
cat << EOF
ARCH: "arm"
EOF
else
cat << EOF
ARCH: "arm64"
EOF
fi
cat << EOF
depends_on:
- "unit-test"
key: "build-deb-package-${DEB_PACKAGE}"
EOF
done