From 1059551133ca66cce185d72aabc569111f9500e1 Mon Sep 17 00:00:00 2001 From: Amir Zarrinkafsh Date: Mon, 20 Jan 2020 10:53:55 +1100 Subject: [PATCH] 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 --- .buildkite/hooks/post-checkout | 4 +++- .buildkite/hooks/pre-artifact | 4 ++-- .buildkite/steps/buildimages.sh | 4 ++-- .buildkite/steps/ghartifacts.sh | 7 ++++--- README.md | 4 ++-- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.buildkite/hooks/post-checkout b/.buildkite/hooks/post-checkout index 37f7f059..d4a54974 100755 --- a/.buildkite/hooks/post-checkout +++ b/.buildkite/hooks/post-checkout @@ -2,7 +2,9 @@ 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 echo "--- :buildkite: Setting up Build environment" source bootstrap.sh diff --git a/.buildkite/hooks/pre-artifact b/.buildkite/hooks/pre-artifact index 8bfaab03..d22c345a 100755 --- a/.buildkite/hooks/pre-artifact +++ b/.buildkite/hooks/pre-artifact @@ -12,8 +12,8 @@ then docker cp authelia-binary:/usr/app/authelia ./authelia-linux-"${ARCH}" docker cp authelia-binary:/usr/app/public_html ./ docker rm -f authelia-binary - tar -I 'zstdmt -T0 -12' -cf authelia-linux-"${ARCH}".tar.zst authelia-linux-"${ARCH}" public_html - sha256sum authelia-linux-"${ARCH}".tar.zst > authelia-linux-"${ARCH}".tar.zst.sha256 + tar -czf authelia-linux-"${ARCH}".tar.gz authelia-linux-"${ARCH}" public_html + sha256sum authelia-linux-"${ARCH}".tar.gz > authelia-linux-"${ARCH}".tar.gz.sha256 # Saving image for push to docker hub docker save $DOCKER_IMAGE | zstdmt -T0 -12 > authelia-image-"${ARCH}".tar.zst fi \ No newline at end of file diff --git a/.buildkite/steps/buildimages.sh b/.buildkite/steps/buildimages.sh index aaf256ee..f6536e2a 100755 --- a/.buildkite/steps/buildimages.sh +++ b/.buildkite/steps/buildimages.sh @@ -8,8 +8,8 @@ do echo " - \"authelia-scripts docker build --arch=${BUILD_ARCH}\"" echo " artifact_paths:" echo " - \"authelia-image-${BUILD_ARCH}.tar.zst\"" - echo " - \"authelia-linux-${BUILD_ARCH}.tar.zst\"" - echo " - \"authelia-linux-${BUILD_ARCH}.tar.zst.sha256\"" + echo " - \"authelia-linux-${BUILD_ARCH}.tar.gz\"" + echo " - \"authelia-linux-${BUILD_ARCH}.tar.gz.sha256\"" if [[ "${BUILD_ARCH}" != "amd64" ]]; then echo " branches: \"master v*\"" diff --git a/.buildkite/steps/ghartifacts.sh b/.buildkite/steps/ghartifacts.sh index 9ca19dd7..504ee910 100755 --- a/.buildkite/steps/ghartifacts.sh +++ b/.buildkite/steps/ghartifacts.sh @@ -4,11 +4,12 @@ set -eu artifacts=() for FILES in \ - authelia-linux-amd64.tar.zst authelia-linux-amd64.tar.zst.sha256 \ - authelia-linux-arm32v7.tar.zst authelia-linux-arm32v7.tar.zst.sha256 \ - authelia-linux-arm64v8.tar.zst authelia-linux-arm64v8.tar.zst.sha256; + authelia-linux-amd64.tar.gz authelia-linux-amd64.tar.gz.sha256 \ + authelia-linux-arm32v7.tar.gz authelia-linux-arm32v7.tar.gz.sha256 \ + authelia-linux-arm64v8.tar.gz authelia-linux-arm64v8.tar.gz.sha256; do artifacts+=(-a "${FILES}") done +echo "--- :github: Deploy artifacts for release: ${BUILDKITE_TAG}" hub release create "${artifacts[@]}" -m "${BUILDKITE_TAG}" "${BUILDKITE_TAG}" \ No newline at end of file diff --git a/README.md b/README.md index fdc7f94e..157554db 100644 --- a/README.md +++ b/README.md @@ -102,14 +102,14 @@ Would you like to report any vulnerability discovered in Authelia, please first ## Changelog & Breaking changes -See [CHANGELOG.md](./CHANGELOG.md) and [BREAKING.md](./BREAKING.md). +See [CHANGELOG](./CHANGELOG.md) and [BREAKING](./BREAKING.md). ## Contribute Anybody willing to contribute to the project either with code, documentation, security reviews or whatever, are very welcome to issue 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!