diff --git a/.buildkite/scripts/common.sh b/.buildkite/scripts/common.sh index 4bcc519f7..830ee90f8 100755 --- a/.buildkite/scripts/common.sh +++ b/.buildkite/scripts/common.sh @@ -78,6 +78,11 @@ retry() { return 0 } +publish_docker_image() { + echo "Pushing the docker image "$DOCKER_IMAGE":"$DOCKER_IMAGE_TAG" to the "${DOCKER_REGISTRY}" registry..." + DOCKER_IMAGE=${DOCKER_IMAGE} DOCKER_IMAGE_TAG=${DOCKER_IMAGE_TAG} make release-docker +} + docker_logout() { echo "Logging out from Docker..." docker logout ${DOCKER_REGISTRY} @@ -142,7 +147,7 @@ upload_mbp_packages_to_gcp_bucket() { local pattern=${1} local type=${2} get_bucket_uri "${type}" - gsutil -m -q cp -a public-read -r ${pattern} ${bucketUri} + gsutil -m cp -a public-read -r ${pattern} ${bucketUri} } download_mbp_packages_from_gcp_bucket() { @@ -150,7 +155,7 @@ download_mbp_packages_from_gcp_bucket() { local type=${2} mkdir -p ${WORKSPACE}/${pattern} get_bucket_uri "${type}" - gsutil -m -q cp -r ${bucketUri}/* ${WORKSPACE}/${pattern} + gsutil -m -q cp -r ${bucketUri} ${WORKSPACE}/${pattern} } with_mage() { diff --git a/.buildkite/scripts/dra_release.sh b/.buildkite/scripts/dra_release.sh index a0cc0568b..769470467 100755 --- a/.buildkite/scripts/dra_release.sh +++ b/.buildkite/scripts/dra_release.sh @@ -1,6 +1,6 @@ #!/bin/bash -set -euox pipefail +set -euo pipefail source .buildkite/scripts/common.sh @@ -11,7 +11,6 @@ export PROJECT="fleet-server" export TYPE=${1} export BRANCH="${BUILDKITE_BRANCH}" export VERSION="$(make get-version)" -export WORKSPACE if [[ "${VERSION}" == *"-SNAPSHOT"* || "${VERSION}" == "" ]]; then echo "The 'version' parameter is required and it cannot contain the suffix '-SNAPSHOT'." diff --git a/.buildkite/scripts/release-manager.sh b/.buildkite/scripts/release-manager.sh index d2284934c..174de9198 100755 --- a/.buildkite/scripts/release-manager.sh +++ b/.buildkite/scripts/release-manager.sh @@ -15,6 +15,9 @@ # It uses env variables to help to run this script with a simpler jenkins # pipeline call. # + +source .buildkite/scripts/common.sh + set -uexo pipefail readonly TYPE=${TYPE:-snapshot}