Skip to content

Commit

Permalink
resolving review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
raj-prince committed Feb 7, 2024
1 parent 6fbbf21 commit c64859e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
8 changes: 4 additions & 4 deletions tools/cd_scripts/package_gcsfuse.sh
Expand Up @@ -64,9 +64,9 @@ function exit_in_failure() {
RELEASE_VERSION=$(fetch_meta_data_value "RELEASE_VERSION")
echo RELEASE_VERSION="$RELEASE_VERSION"

# '~' is not accepted as docker build tag and git tag. Hence, we will it instead of RELEASE_VERSION.
# '~' is not accepted as docker build tag and git tag. Hence, we will use `_` instead of RELEASE_VERSION.
RELEASE_VERSION_TAG=$(echo $RELEASE_VERSION | tr '~' '_')
echo RELEASE_VERSION_TAG="$DOCKER_BUILD_TAG_SUFFIX"
echo RELEASE_VERSION_TAG="$RELEASE_VERSION_TAG"

# Fetch metadata value of the key "UPLOAD_BUCKET"
UPLOAD_BUCKET=$(fetch_meta_data_value "UPLOAD_BUCKET")
Expand All @@ -92,13 +92,13 @@ cd gcsfuse/tools/package_gcsfuse_docker/
set +e
exit_code=0
echo "Building docker for amd64 ..."
sudo docker buildx build --load . -t gcsfuse-release-amd64:"$RELEASE_VERSION_TAG" --build-arg GCSFUSE_VERSION="$RELEASE_VERSION" --build-arg ARCHITECTURE=amd64 --build-arg GIT_BUILD_TAG="v$RELEASE_VERSION_TAG" --platform=linux/amd64 &> docker_amd64.log &
sudo docker buildx build --load . -t gcsfuse-release-amd64:"$RELEASE_VERSION_TAG" --build-arg GCSFUSE_VERSION="$RELEASE_VERSION" --build-arg ARCHITECTURE=amd64 --build-arg BRANCH_NAME="v$RELEASE_VERSION_TAG" --platform=linux/amd64 &> docker_amd64.log &
pid1=$!
echo "Building docker for arm64 ..."
# It is necessary for cross-platform image building because it creates a builder instance that is capable of
# building images for multiple architectures.
sudo docker buildx create --name mybuilder --bootstrap --use
sudo docker buildx build --load . -t gcsfuse-release-arm64:"$RELEASE_VERSION_TAG" --build-arg GCSFUSE_VERSION="$RELEASE_VERSION" --build-arg ARCHITECTURE=arm64 --build-arg GIT_BUILD_TAG="v$RELEASE_VERSION_TAG" --platform=linux/arm64 &> docker_arm64.log &
sudo docker buildx build --load . -t gcsfuse-release-arm64:"$RELEASE_VERSION_TAG" --build-arg GCSFUSE_VERSION="$RELEASE_VERSION" --build-arg ARCHITECTURE=arm64 --build-arg BRANCH_NAME="v$RELEASE_VERSION_TAG" --platform=linux/arm64 &> docker_arm64.log &
pid2=$!
echo "Waiting for both builds to complete ..."
wait $pid1
Expand Down
7 changes: 1 addition & 6 deletions tools/package_gcsfuse_docker/Dockerfile
Expand Up @@ -37,12 +37,7 @@ ARG DEBFULLNAME="GCSFuse Team"
# Build Arg for building through a particular branch/commit. By default, it uses
# the tag corresponding to passed GCSFUSE VERSION
ARG BRANCH_NAME="v${GCSFUSE_VERSION}"
ARG GIT_BUILD_TAG
RUN if [ "${GIT_BUILD_TAG}" = "" ]; then \
git checkout ${BRANCH_NAME}; \
else \
git checkout ${GIT_BUILD_TAG}; \
fi
RUN git checkout "${BRANCH_NAME}"

# Install fpm package using bundle
RUN bundle install --gemfile=${GCSFUSE_PATH}/tools/gem_dependency/Gemfile
Expand Down

0 comments on commit c64859e

Please sign in to comment.