Commit 9adef247 authored by jinkaiqiang's avatar jinkaiqiang

清除release镜像修改错误

parent eb4be1c2
...@@ -3,8 +3,9 @@ cmd=$1 ...@@ -3,8 +3,9 @@ cmd=$1
# 清除release镜像版本 # 清除release镜像版本
function clear_release_image() { function clear_release_image() {
release_image_version=`$image_version`"_beta" release_image_version=$image_version"_beta"
docker images | grep $release_image_version > /dev/null 2>&1 && docker images | grep none|awk '{print $3 }' | xargs docker rmi docker rmi ${APP_IMAGE}:$release_image_version
docker rmi ${ALI_IMAGE}:$release_image_version
echo "成功清除release版本"$release_image_version echo "成功清除release版本"$release_image_version
} }
# 规范镜像版本 # 规范镜像版本
...@@ -51,7 +52,7 @@ elif [ "$cmd" == "push" ]; then ...@@ -51,7 +52,7 @@ elif [ "$cmd" == "push" ]; then
elif [ "$cmd" == "push_ali" ]; then elif [ "$cmd" == "push_ali" ]; then
echo "push_ali..." echo "push_ali..."
foramt_image_version foramt_image_version
docker tag ${APP_IMAGE}:$image_version ${ALI_IMAGE}:${CI_COMMIT_REF_NAME} docker tag ${APP_IMAGE}:$image_version ${ALI_IMAGE}:$image_version
docker push ${ALI_IMAGE}:$image_version docker push ${ALI_IMAGE}:$image_version
else else
echo "无效命令:$cmd" echo "无效命令:$cmd"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment