Optimise deploy artifacts step (#564)

* Optimise deploy artifacts step
authelia-scripts is not required to publish GitHub artifacts as we utilise [Hub](https://hub.github.com/), this should save ~10 seconds in this step.

* Specify release number in pipeline

* Change buildkite and github published artifacts back to gzip

* Update README.md
pull/566/head
Amir Zarrinkafsh 2020-01-20 10:53:55 +11:00 committed by GitHub
parent aafd8fdbd8
commit 1059551133
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 10 deletions

View File

@ -2,7 +2,9 @@
set +u set +u
if [[ ! $BUILDKITE_COMMAND =~ "buildkite-agent pipeline upload" ]] || [[ $BUILDKITE_COMMAND == ".buildkite/steps/e2etests.sh | buildkite-agent pipeline upload" ]]; if [[ ! $BUILDKITE_COMMAND =~ "buildkite-agent pipeline upload" ]] || \
[[ $BUILDKITE_COMMAND == ".buildkite/steps/e2etests.sh | buildkite-agent pipeline upload" ]] || \
[[ ! $BUILDKITE_COMMAND == ".buildkite/steps/ghartifacts.sh" ]];
then then
echo "--- :buildkite: Setting up Build environment" echo "--- :buildkite: Setting up Build environment"
source bootstrap.sh source bootstrap.sh

View File

@ -12,8 +12,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 -I 'zstdmt -T0 -12' -cf authelia-linux-"${ARCH}".tar.zst authelia-linux-"${ARCH}" public_html tar -czf authelia-linux-"${ARCH}".tar.gz authelia-linux-"${ARCH}" public_html
sha256sum authelia-linux-"${ARCH}".tar.zst > authelia-linux-"${ARCH}".tar.zst.sha256 sha256sum authelia-linux-"${ARCH}".tar.gz > authelia-linux-"${ARCH}".tar.gz.sha256
# Saving image for push to docker hub # Saving image for push to docker hub
docker save $DOCKER_IMAGE | zstdmt -T0 -12 > authelia-image-"${ARCH}".tar.zst docker save $DOCKER_IMAGE | zstdmt -T0 -12 > authelia-image-"${ARCH}".tar.zst
fi fi

View File

@ -8,8 +8,8 @@ do
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.zst\"" echo " - \"authelia-image-${BUILD_ARCH}.tar.zst\""
echo " - \"authelia-linux-${BUILD_ARCH}.tar.zst\"" echo " - \"authelia-linux-${BUILD_ARCH}.tar.gz\""
echo " - \"authelia-linux-${BUILD_ARCH}.tar.zst.sha256\"" echo " - \"authelia-linux-${BUILD_ARCH}.tar.gz.sha256\""
if [[ "${BUILD_ARCH}" != "amd64" ]]; if [[ "${BUILD_ARCH}" != "amd64" ]];
then then
echo " branches: \"master v*\"" echo " branches: \"master v*\""

View File

@ -4,11 +4,12 @@ set -eu
artifacts=() artifacts=()
for FILES in \ for FILES in \
authelia-linux-amd64.tar.zst authelia-linux-amd64.tar.zst.sha256 \ authelia-linux-amd64.tar.gz authelia-linux-amd64.tar.gz.sha256 \
authelia-linux-arm32v7.tar.zst authelia-linux-arm32v7.tar.zst.sha256 \ authelia-linux-arm32v7.tar.gz authelia-linux-arm32v7.tar.gz.sha256 \
authelia-linux-arm64v8.tar.zst authelia-linux-arm64v8.tar.zst.sha256; authelia-linux-arm64v8.tar.gz authelia-linux-arm64v8.tar.gz.sha256;
do do
artifacts+=(-a "${FILES}") artifacts+=(-a "${FILES}")
done done
echo "--- :github: Deploy artifacts for release: ${BUILDKITE_TAG}"
hub release create "${artifacts[@]}" -m "${BUILDKITE_TAG}" "${BUILDKITE_TAG}" hub release create "${artifacts[@]}" -m "${BUILDKITE_TAG}" "${BUILDKITE_TAG}"

View File

@ -102,14 +102,14 @@ Would you like to report any vulnerability discovered in Authelia, please first
## Changelog & Breaking changes ## Changelog & Breaking changes
See [CHANGELOG.md](./CHANGELOG.md) and [BREAKING.md](./BREAKING.md). See [CHANGELOG](./CHANGELOG.md) and [BREAKING](./BREAKING.md).
## Contribute ## Contribute
Anybody willing to contribute to the project either with code, Anybody willing to contribute to the project either with code,
documentation, security reviews or whatever, are very welcome to issue documentation, security reviews or whatever, are very welcome to issue
or review pull requests and take part to discussions in or review pull requests and take part to discussions in
[Gitter](https://gitter.im/authelia/general?utm_source=share-link&utm_medium=link&utm_campaign=share-link). [Matrix](https://riot.im/app/#/room/#authelia:matrix.org)
I am very grateful to contributors for their contributions to the project. Don't hesitate, be the next! I am very grateful to contributors for their contributions to the project. Don't hesitate, be the next!