2019-12-27 18:07:53 +07:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set +u
|
|
|
|
|
|
|
|
DOCKER_IMAGE=authelia/authelia
|
|
|
|
|
|
|
|
if [[ $BUILDKITE_COMMAND == "authelia-scripts --log-level debug ci" ]];
|
|
|
|
then
|
2020-01-07 08:19:09 +07:00
|
|
|
echo "--- :go::node: Saving artifacts for :chrome::selenium: Integration tests"
|
2020-01-07 18:28:04 +07:00
|
|
|
tar -I 'zstdmt -T0 -12' -cf dist.tar.zst dist
|
|
|
|
tar -I 'zstdmt -T0 -12' -cf web.tar.zst web
|
2019-12-27 18:07:53 +07:00
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ $BUILDKITE_LABEL =~ ":docker: Build Image" ]];
|
|
|
|
then
|
|
|
|
echo "--- :docker: Saving artifacts for :buildkite: :docker: :github: releases"
|
|
|
|
# Save binary for buildkite and github artifacts
|
|
|
|
docker create --name authelia-binary $DOCKER_IMAGE:latest
|
2020-01-05 21:31:33 +07:00
|
|
|
docker cp authelia-binary:/usr/app/authelia ./authelia-linux-"${ARCH}"
|
2019-12-27 18:07:53 +07:00
|
|
|
docker cp authelia-binary:/usr/app/public_html ./
|
|
|
|
docker rm -f authelia-binary
|
2020-01-07 18:28:04 +07:00
|
|
|
tar -I 'zstdmt -T0 -12' -cf authelia-linux-"${ARCH}".tar.zst authelia-linux-"${ARCH}" public_html
|
2020-01-07 06:12:37 +07:00
|
|
|
sha256sum authelia-linux-"${ARCH}".tar.zst > authelia-linux-"${ARCH}".tar.zst.sha256
|
2019-12-27 18:07:53 +07:00
|
|
|
# Saving image for push to DockerHub
|
2020-01-07 18:28:04 +07:00
|
|
|
docker save $DOCKER_IMAGE | zstdmt -T0 -12 > authelia-image-"${ARCH}".tar.zst
|
2019-12-27 18:07:53 +07:00
|
|
|
fi
|