Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
deploy_script
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Script
deploy_script
Commits
9adef247
You need to sign in or sign up before continuing.
Commit
9adef247
authored
Dec 07, 2020
by
jinkaiqiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
清除release镜像修改错误
parent
eb4be1c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
docker_ci_tools.sh
docker_ci_tools.sh
+4
-3
No files found.
docker_ci_tools.sh
View file @
9adef247
...
@@ -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
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment