2020-06-18 14:49:13 +07:00
|
|
|
#!/usr/bin/env bash
|
2019-12-27 18:07:53 +07:00
|
|
|
|
|
|
|
set +u
|
|
|
|
|
|
|
|
DOCKER_IMAGE=authelia/authelia
|
|
|
|
|
2020-04-28 21:07:20 +07:00
|
|
|
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
|
|
|
|
|
2020-01-30 14:37:11 +07:00
|
|
|
if [[ $BUILDKITE_LABEL =~ ":docker: Build Image" ]]; then
|
2019-12-27 18:07:53 +07:00
|
|
|
echo "--- :docker: Saving artifacts for :buildkite: :docker: :github: releases"
|
|
|
|
# Save binary for buildkite and github artifacts
|
2020-06-05 07:43:19 +07:00
|
|
|
if [[ "${ARCH}" != "coverage" ]]; then
|
|
|
|
docker create --name authelia-binary ${DOCKER_IMAGE}:latest
|
2020-06-17 13:25:35 +07:00
|
|
|
docker cp authelia-binary:/app/authelia ./authelia-"${OS}"-"${ARCH}"
|
2020-06-05 07:43:19 +07:00
|
|
|
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
|
|
|
|
fi
|
2020-05-03 19:03:53 +07:00
|
|
|
# Saving image for push to docker hub
|
|
|
|
docker save ${DOCKER_IMAGE} | zstdmt -T0 -12 > authelia-image-"${ARCH}".tar.zst
|
2019-12-27 18:07:53 +07:00
|
|
|
fi
|