Utilise zstd for compression
parent
8b8d0c0037
commit
e97a11a9c1
|
@ -6,8 +6,8 @@ DOCKER_IMAGE=authelia/authelia
|
||||||
|
|
||||||
if [[ $BUILDKITE_COMMAND == "authelia-scripts --log-level debug ci" ]];
|
if [[ $BUILDKITE_COMMAND == "authelia-scripts --log-level debug ci" ]];
|
||||||
then
|
then
|
||||||
tar -czf dist.tar.gz dist
|
tar --zstd -cf dist.tar.zst dist
|
||||||
tar -czf web.tar.gz web
|
tar --zstd -cf web.tar.zst web
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $BUILDKITE_LABEL =~ ":docker: Build Image" ]];
|
if [[ $BUILDKITE_LABEL =~ ":docker: Build Image" ]];
|
||||||
|
@ -18,8 +18,8 @@ then
|
||||||
docker cp authelia-binary:/usr/app/authelia ./authelia-linux-"${ARCH}"
|
docker cp authelia-binary:/usr/app/authelia ./authelia-linux-"${ARCH}"
|
||||||
docker cp authelia-binary:/usr/app/public_html ./
|
docker cp authelia-binary:/usr/app/public_html ./
|
||||||
docker rm -f authelia-binary
|
docker rm -f authelia-binary
|
||||||
tar -czf authelia-linux-"${ARCH}".tar.gz authelia-linux-"${ARCH}" public_html
|
tar --zstd -cf authelia-linux-"${ARCH}".tar.zst authelia-linux-"${ARCH}" public_html
|
||||||
sha256sum authelia-linux-"${ARCH}".tar.gz > authelia-linux-"${ARCH}".tar.gz.sha256
|
sha256sum authelia-linux-"${ARCH}".tar.zst > authelia-linux-"${ARCH}".tar.zst.sha256
|
||||||
# Saving image for push to DockerHub
|
# Saving image for push to DockerHub
|
||||||
docker save $DOCKER_IMAGE | gzip > authelia-image-"${ARCH}".tar.gz
|
docker save $DOCKER_IMAGE | zstd > authelia-image-"${ARCH}".tar.zst
|
||||||
fi
|
fi
|
|
@ -5,14 +5,14 @@ set +u
|
||||||
if [[ $BUILDKITE_LABEL =~ ":selenium:" ]];
|
if [[ $BUILDKITE_LABEL =~ ":selenium:" ]];
|
||||||
then
|
then
|
||||||
echo "--- :go::node: Extracting build artifacts"
|
echo "--- :go::node: Extracting build artifacts"
|
||||||
buildkite-agent artifact download "dist.tar.gz" . && tar xf dist.tar.gz
|
buildkite-agent artifact download "dist.tar.zst" . && tar xf dist.tar.zst
|
||||||
buildkite-agent artifact download "web.tar.gz" . && tar xf web.tar.gz
|
buildkite-agent artifact download "web.tar.zst" . && tar xf web.tar.zst
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $BUILDKITE_LABEL =~ ":docker: Deploy Image" ]];
|
if [[ $BUILDKITE_LABEL =~ ":docker: Deploy Image" ]];
|
||||||
then
|
then
|
||||||
buildkite-agent artifact download "authelia-image-${ARCH}*" .
|
buildkite-agent artifact download "authelia-image-${ARCH}*" .
|
||||||
zcat authelia-image-"${ARCH}".tar.gz | docker load
|
zstdcat authelia-image-"${ARCH}".tar.zst | docker load
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $BUILDKITE_LABEL == ":github: Deploy Artifacts" ]];
|
if [[ $BUILDKITE_LABEL == ":github: Deploy Artifacts" ]];
|
||||||
|
|
|
@ -4,8 +4,8 @@ steps:
|
||||||
agents:
|
agents:
|
||||||
upload: "fast"
|
upload: "fast"
|
||||||
artifact_paths:
|
artifact_paths:
|
||||||
- "dist.tar.gz"
|
- "dist.tar.zst"
|
||||||
- "web.tar.gz"
|
- "web.tar.zst"
|
||||||
key: "build"
|
key: "build"
|
||||||
|
|
||||||
- wait
|
- wait
|
||||||
|
|
|
@ -7,9 +7,9 @@ do
|
||||||
echo " commands:"
|
echo " commands:"
|
||||||
echo " - \"authelia-scripts docker build --arch=${BUILD_ARCH}\""
|
echo " - \"authelia-scripts docker build --arch=${BUILD_ARCH}\""
|
||||||
echo " artifact_paths:"
|
echo " artifact_paths:"
|
||||||
echo " - \"authelia-image-${BUILD_ARCH}.tar.gz\""
|
echo " - \"authelia-image-${BUILD_ARCH}.tar.zst\""
|
||||||
echo " - \"authelia-linux-${BUILD_ARCH}.tar.gz\""
|
echo " - \"authelia-linux-${BUILD_ARCH}.tar.zst\""
|
||||||
echo " - \"authelia-linux-${BUILD_ARCH}.tar.gz.sha256\""
|
echo " - \"authelia-linux-${BUILD_ARCH}.tar.zst.sha256\""
|
||||||
echo " env:"
|
echo " env:"
|
||||||
echo " "ARCH: ${BUILD_ARCH}""
|
echo " "ARCH: ${BUILD_ARCH}""
|
||||||
done
|
done
|
|
@ -4,9 +4,9 @@ set -eu
|
||||||
artifacts=()
|
artifacts=()
|
||||||
|
|
||||||
for FILES in \
|
for FILES in \
|
||||||
authelia-linux-amd64.tar.gz authelia-linux-amd64.tar.gz.sha256 \
|
authelia-linux-amd64.tar.zst authelia-linux-amd64.tar.zst.sha256 \
|
||||||
authelia-linux-arm32v7.tar.gz authelia-linux-arm32v7.tar.gz.sha256 \
|
authelia-linux-arm32v7.tar.zst authelia-linux-arm32v7.tar.zst.sha256 \
|
||||||
authelia-linux-arm64v8.tar.gz authelia-linux-arm64v8.tar.gz.sha256;
|
authelia-linux-arm64v8.tar.zst authelia-linux-arm64v8.tar.zst.sha256;
|
||||||
do
|
do
|
||||||
artifacts+=(-a "${FILES}")
|
artifacts+=(-a "${FILES}")
|
||||||
done
|
done
|
||||||
|
|
|
@ -99,13 +99,13 @@ jobs:
|
||||||
- docker create --name authelia-binary authelia/authelia:${TRAVIS_TAG:1}-$ARCH
|
- docker create --name authelia-binary authelia/authelia:${TRAVIS_TAG:1}-$ARCH
|
||||||
- docker cp authelia-binary:/usr/app/authelia ./authelia-linux-$ARCH
|
- docker cp authelia-binary:/usr/app/authelia ./authelia-linux-$ARCH
|
||||||
- docker cp authelia-binary:/usr/app/public_html ./
|
- docker cp authelia-binary:/usr/app/public_html ./
|
||||||
- tar -czf authelia-linux-$ARCH.tar.gz authelia-linux-$ARCH public_html
|
- tar --zstd -cf authelia-linux-$ARCH.tar.zst authelia-linux-$ARCH public_html
|
||||||
- sha256sum authelia-linux-$ARCH.tar.gz > authelia-linux-$ARCH.tar.gz.sha256
|
- sha256sum authelia-linux-$ARCH.tar.zst > authelia-linux-$ARCH.tar.zst.sha256
|
||||||
deploy:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
api_key: "$GITHUB_API_KEY"
|
api_key: "$GITHUB_API_KEY"
|
||||||
file_glob: true
|
file_glob: true
|
||||||
file: "authelia-linux-$ARCH.tar.gz*"
|
file: "authelia-linux-$ARCH.tar.zst*"
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
on:
|
on:
|
||||||
tags: true
|
tags: true
|
||||||
|
|
Loading…
Reference in New Issue