Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
I
install.api
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
install.api
Commits
aa9ae964
Commit
aa9ae964
authored
Apr 09, 2020
by
金凯强
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
远程升级删除旧镜像
parent
249157a0
Pipeline
#22422
passed with stage
in 22 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
upgrade_service.py
app/upgrade/upgrade_service.py
+3
-0
load_handle.py
static_file/system_file/load_handle.py
+0
-3
No files found.
app/upgrade/upgrade_service.py
View file @
aa9ae964
...
...
@@ -168,6 +168,9 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
with
open
(
docker_compose_file_dir
,
'w'
,
encoding
=
'utf8'
)
as
f
:
f
.
write
(
compose_content
)
logger
.
info
(
'删除服务器上的旧镜像文件'
)
ssh
.
exec_command
(
'rm /huansi/upgrade/*.tar -f'
)
for
files
in
os
.
listdir
(
upgrade_back_up_dir
):
path
=
os
.
path
.
join
(
upgrade_back_up_dir
,
files
)
# 隐藏文件不复制
...
...
static_file/system_file/load_handle.py
View file @
aa9ae964
...
...
@@ -37,9 +37,6 @@ if __name__ == '__main__':
with
open
(
'/data/nginx/conf/rpc.conf'
,
'w'
)
as
f
:
f
.
write
(
rpc_conf_content
)
print
(
'删除旧镜像'
)
os
.
system
(
'rm *.tar -f'
)
with
os
.
popen
(
'ls | grep .tar'
)
as
f
:
cmd_txt
=
f
.
read
()
...
...
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