Skip to content

Commit

Permalink
fix(build): fix image ENV as per image push script (#316)
Browse files Browse the repository at this point in the history
* fix(build): fix image ENV as per image push
* This commit handles the error from push script

Signed-off-by: mittachaitu <sai.chaithanya@mayadata.io>
  • Loading branch information
sai chaithanya authored Aug 9, 2020
1 parent a44a17e commit 6bd970f
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,16 @@ sudo docker build --help
curl --fail https://raw.githubusercontent.com/openebs/charts/gh-pages/scripts/release/buildscripts/push > ./docker/push
chmod +x ./docker/push

## Building image for cstor-base
echo "Build image ${REPO_NAME}:ci with BUILD_DATE=${DBUILD_DATE}"
cd docker && \
sudo docker build -f ${DOCKERFILE_BASE} -t ${REPO_NAME}:ci ${DBUILD_ARGS} . && \
IMAGE_REPO=${REPO_NAME} ./push && \
DIMAGE=${REPO_NAME} ./push && \
cd ..
if [ $? -ne 0 ]; then
echo "Failed to run push script for ${REPO_NAME}"
exit 1
fi

if [ "${ARCH}" = "x86_64" ]; then
REPO_NAME="$IMAGE_ORG/cstor-pool"
Expand All @@ -109,7 +114,11 @@ fi
echo "Build image ${REPO_NAME}:ci with BUILD_DATE=${DBUILD_DATE}"
cd docker && \
sudo docker build -f ${DOCKERFILE} -t ${REPO_NAME}:ci ${DBUILD_ARGS} . && \
IMAGE_REPO=${REPO_NAME} ./push && \
DIMAGE=${REPO_NAME} ./push && \
cd ..
if [ $? -ne 0 ]; then
echo "Failed to run push script for ${REPO_NAME}"
exit 1
fi

rm -rf ./docker/zfs

0 comments on commit 6bd970f

Please sign in to comment.