Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Improve the release docker scripts with clean, build, tag-nightly cap…
Browse files Browse the repository at this point in the history
…abilities (#1100)
  • Loading branch information
jerrychenhf authored Feb 3, 2023
1 parent 0e65d6c commit 9fb2f8a
Showing 1 changed file with 51 additions and 7 deletions.
58 changes: 51 additions & 7 deletions dev/release-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,24 @@ do
shift
IMAGE_TAG=$1
;;
--clean)
# Remove the local images for the image tag.
DO_CLEAN=YES
;;
--build)
# Build with the image tag
DO_BUILD=YES
;;
--tag-nightly)
# Tag nightly to the specified image tag
TAG_NIGHTLY=YES
;;
--no-push)
# Do build only, no push
NO_PUSH=YES
;;
*)
echo "Usage: build-docker.sh [ --image-tag ]"
echo "Usage: release-docker.sh [ --image-tag ] --clean --build --tag-nightly --no-push"
exit 1
esac
shift
Expand All @@ -24,10 +40,38 @@ done
cd $CLOUDTIK_HOME
source /home/ubuntu/anaconda3/bin/activate cloudtik_py37

sudo bash ./build-docker.sh --image-tag $IMAGE_TAG --build-spark --build-ml --build-ml-mxnet --build-spark-benchmark
if [ $DO_CLEAN ]; then
sudo docker rmi cloudtik/spark-runtime-benchmark:$IMAGE_TAG
sudo docker rmi cloudtik/spark-ml-mxnet:$IMAGE_TAG
sudo docker rmi cloudtik/spark-ml-runtime:$IMAGE_TAG
sudo docker rmi cloudtik/spark-ml-base:$IMAGE_TAG
sudo docker rmi cloudtik/spark-runtime:$IMAGE_TAG
sudo docker rmi cloudtik/cloudtik:$IMAGE_TAG
sudo docker rmi cloudtik/cloudtik-deps:$IMAGE_TAG
sudo docker rmi cloudtik/cloudtik-base:$IMAGE_TAG
fi

if [ $TAG_NIGHTLY ]; then
sudo docker tag cloudtik/spark-runtime-benchmark:nightly cloudtik/spark-runtime-benchmark:$IMAGE_TAG
sudo docker tag cloudtik/spark-ml-mxnet:nightly cloudtik/spark-ml-mxnet:$IMAGE_TAG
sudo docker tag cloudtik/spark-ml-runtime:nightly cloudtik/spark-ml-runtime:$IMAGE_TAG
sudo docker tag cloudtik/spark-ml-base:nightly cloudtik/spark-ml-base:$IMAGE_TAG
sudo docker tag cloudtik/spark-runtime:nightly cloudtik/spark-runtime:$IMAGE_TAG
sudo docker tag cloudtik/cloudtik:nightly cloudtik/cloudtik:$IMAGE_TAG
sudo docker tag cloudtik/cloudtik-deps:nightly cloudtik/cloudtik-deps:$IMAGE_TAG
sudo docker tag cloudtik/cloudtik-base:nightly cloudtik/cloudtik-base:$IMAGE_TAG
fi

if [ $DO_BUILD ]; then
# default, do build and push
sudo bash ./build-docker.sh --image-tag $IMAGE_TAG --build-spark --build-ml --build-ml-mxnet --build-spark-benchmark
fi

sudo docker push cloudtik/cloudtik:$IMAGE_TAG
sudo docker push cloudtik/spark-runtime:$IMAGE_TAG
sudo docker push cloudtik/spark-ml-runtime:$IMAGE_TAG
sudo docker push cloudtik/spark-ml-mxnet:$IMAGE_TAG
sudo docker push cloudtik/spark-runtime-benchmark:$IMAGE_TAG
# Default push
if [ ! $NO_PUSH ]; then
sudo docker push cloudtik/cloudtik:$IMAGE_TAG
sudo docker push cloudtik/spark-runtime:$IMAGE_TAG
sudo docker push cloudtik/spark-ml-runtime:$IMAGE_TAG
sudo docker push cloudtik/spark-ml-mxnet:$IMAGE_TAG
sudo docker push cloudtik/spark-runtime-benchmark:$IMAGE_TAG
fi

0 comments on commit 9fb2f8a

Please sign in to comment.