diff --git a/.buildkite/hooks/post-command b/.buildkite/hooks/post-command index 32578cbf..af0c112f 100755 --- a/.buildkite/hooks/post-command +++ b/.buildkite/hooks/post-command @@ -5,9 +5,9 @@ set +u if [[ $BUILDKITE_LABEL =~ ":selenium:" ]] || [[ $BUILDKITE_LABEL =~ ":docker: Build Image" ]]; then CONTAINERS=$(docker ps -a -q) - if [[ $CONTAINERS != "" ]]; + if [[ ${CONTAINERS} != "" ]]; then echo "--- :docker: Clean environment" - docker rm -f $CONTAINERS + docker rm -f "${CONTAINERS}" fi fi \ No newline at end of file diff --git a/.buildkite/hooks/pre-artifact b/.buildkite/hooks/pre-artifact index 8fb94446..6d2d75e4 100755 --- a/.buildkite/hooks/pre-artifact +++ b/.buildkite/hooks/pre-artifact @@ -15,11 +15,11 @@ 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 - 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 rm -f authelia-binary - tar -czf authelia-linux-$ARCH.tar.gz authelia-linux-$ARCH public_html - sha256sum authelia-linux-$ARCH.tar.gz > authelia-linux-$ARCH.tar.gz.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 DockerHub - docker save $DOCKER_IMAGE | gzip > authelia-image-$ARCH.tar.gz + docker save $DOCKER_IMAGE | gzip > authelia-image-"${ARCH}".tar.gz fi \ No newline at end of file diff --git a/.buildkite/hooks/pre-command b/.buildkite/hooks/pre-command index 8528e344..aa04019e 100755 --- a/.buildkite/hooks/pre-command +++ b/.buildkite/hooks/pre-command @@ -11,8 +11,8 @@ fi if [[ $BUILDKITE_LABEL =~ ":docker: Deploy Image" ]]; then - buildkite-agent artifact download "authelia-image-$ARCH*" . - zcat authelia-image-$ARCH.tar.gz | docker load + buildkite-agent artifact download "authelia-image-${ARCH}*" . + zcat authelia-image-"${ARCH}".tar.gz | docker load fi if [[ $BUILDKITE_LABEL == ":github: Deploy Artifacts" ]]; diff --git a/.buildkite/steps/ghartifacts.sh b/.buildkite/steps/ghartifacts.sh index 7a3d07ef..20a6f26a 100755 --- a/.buildkite/steps/ghartifacts.sh +++ b/.buildkite/steps/ghartifacts.sh @@ -3,9 +3,12 @@ set -eu artifacts=() -for FILES in authelia-linux-amd64.tar.gz authelia-linux-arm32v7.tar.gz authelia-linux-arm64v8.tar.gz authelia-linux-amd64.tar.gz.sha256 authelia-linux-arm32v7.tar.gz.sha256 authelia-linux-arm64v8.tar.gz.sha256; +for FILES in \ + 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}) + artifacts+=(-a "${FILES}") done -hub release create ${artifacts[@]} -m $BUILDKITE_TAG $BUILDKITE_TAG \ No newline at end of file +hub release create "${artifacts[@]}" -m "${BUILDKITE_TAG}" "${BUILDKITE_TAG}" \ No newline at end of file