2019-12-27 11:07:53 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set +u
|
|
|
|
|
|
|
|
DOCKER_IMAGE=authelia/authelia
|
|
|
|
|
2020-01-30 07:37:11 +00:00
|
|
|
if [[ $BUILDKITE_LABEL =~ ":docker: Build Image" ]]; then
|
2019-12-27 11:07:53 +00:00
|
|
|
echo "--- :docker: Saving artifacts for :buildkite: :docker: :github: releases"
|
|
|
|
# Save binary for buildkite and github artifacts
|
2020-01-30 07:37:11 +00:00
|
|
|
docker create --name authelia-binary ${DOCKER_IMAGE}:latest
|
2020-01-05 14:31:33 +00:00
|
|
|
docker cp authelia-binary:/usr/app/authelia ./authelia-linux-"${ARCH}"
|
2019-12-27 11:07:53 +00:00
|
|
|
docker cp authelia-binary:/usr/app/public_html ./
|
|
|
|
docker rm -f authelia-binary
|
2020-01-24 09:21:17 +00:00
|
|
|
tar -czf authelia-linux-"${ARCH}".tar.gz authelia-linux-"${ARCH}" authelia.service config.template.yml public_html
|
2020-01-19 23:53:55 +00:00
|
|
|
sha256sum authelia-linux-"${ARCH}".tar.gz > authelia-linux-"${ARCH}".tar.gz.sha256
|
2020-01-17 19:46:51 +00:00
|
|
|
# Saving image for push to docker hub
|
2020-01-30 07:37:11 +00:00
|
|
|
docker save ${DOCKER_IMAGE} | zstdmt -T0 -12 > authelia-image-"${ARCH}".tar.zst
|
2019-12-27 11:07:53 +00:00
|
|
|
fi
|