2020-06-18 07:49:13 +00:00
|
|
|
#!/usr/bin/env bash
|
2019-12-27 11:07:53 +00:00
|
|
|
set -eu
|
|
|
|
|
2020-06-05 00:43:19 +00:00
|
|
|
declare -A BUILDS=(["linux"]="amd64 arm32v7 arm64v8 coverage")
|
2020-04-03 05:13:24 +00:00
|
|
|
|
|
|
|
for BUILD_OS in "${!BUILDS[@]}"; do
|
|
|
|
for BUILD_ARCH in ${BUILDS[$BUILD_OS]}; do
|
2020-03-09 01:32:07 +00:00
|
|
|
cat << EOF
|
|
|
|
- label: ":docker: Build Image [${BUILD_ARCH}]"
|
|
|
|
command: "authelia-scripts docker build --arch=${BUILD_ARCH}"
|
|
|
|
agents:
|
2020-04-08 01:31:33 +00:00
|
|
|
build: "${BUILD_OS}-${BUILD_ARCH}"
|
2020-03-09 01:32:07 +00:00
|
|
|
artifact_paths:
|
|
|
|
- "authelia-image-${BUILD_ARCH}.tar.zst"
|
2020-06-05 00:43:19 +00:00
|
|
|
EOF
|
|
|
|
if [[ "${BUILD_ARCH}" != "coverage" ]]; then
|
|
|
|
cat << EOF
|
2020-04-03 05:13:24 +00:00
|
|
|
- "authelia-${BUILD_OS}-${BUILD_ARCH}.tar.gz"
|
|
|
|
- "authelia-${BUILD_OS}-${BUILD_ARCH}.tar.gz.sha256"
|
2020-06-05 00:43:19 +00:00
|
|
|
EOF
|
|
|
|
fi
|
|
|
|
cat << EOF
|
2020-03-09 01:32:07 +00:00
|
|
|
env:
|
|
|
|
ARCH: "${BUILD_ARCH}"
|
2020-04-03 05:13:24 +00:00
|
|
|
OS: "${BUILD_OS}"
|
|
|
|
key: "build-docker-${BUILD_OS}-${BUILD_ARCH}"
|
2020-03-09 01:32:07 +00:00
|
|
|
EOF
|
2020-06-05 00:43:19 +00:00
|
|
|
if [[ "${BUILD_ARCH}" == "coverage" ]]; then
|
|
|
|
cat << EOF
|
2020-07-02 06:56:45 +00:00
|
|
|
if: build.branch !~ /^(v[0-9]+\.[0-9]+\.[0-9]+)$\$/
|
2020-06-05 00:43:19 +00:00
|
|
|
EOF
|
|
|
|
fi
|
2020-04-03 05:13:24 +00:00
|
|
|
done
|
2019-12-27 11:07:53 +00:00
|
|
|
done
|