Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
deploy
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
Commits
d2a9157d
Commit
d2a9157d
authored
Oct 30, 2019
by
金凯强
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
脚本修改
parent
329b8df5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
upgrade_handle.py
upgradeImage/upgrade_handle.py
+6
-2
No files found.
upgradeImage/upgrade_handle.py
View file @
d2a9157d
...
@@ -4,7 +4,7 @@ from upgradeImage.uploadImage import ImageClass
...
@@ -4,7 +4,7 @@ from upgradeImage.uploadImage import ImageClass
from
upgradeImage.util
import
SSHConnection
,
ShellManage
from
upgradeImage.util
import
SSHConnection
,
ShellManage
if
__name__
==
"__main__"
:
if
__name__
==
"__main__"
:
log
.
info
(
'*********************************
升级
开始*********************************'
)
log
.
info
(
'*********************************
打包
开始*********************************'
)
image_instance
=
ImageClass
()
image_instance
=
ImageClass
()
log
.
info
(
'开始复制docker-compose.yml文件'
)
log
.
info
(
'开始复制docker-compose.yml文件'
)
ShellManage
()
.
exec_shell
(
'cp -f /huansi/gitlab-runner/builds/docker-compose.yml ./docker-compose.yml'
)
ShellManage
()
.
exec_shell
(
'cp -f /huansi/gitlab-runner/builds/docker-compose.yml ./docker-compose.yml'
)
...
@@ -15,7 +15,11 @@ if __name__ == "__main__":
...
@@ -15,7 +15,11 @@ if __name__ == "__main__":
image_instance
.
save_images
()
image_instance
.
save_images
()
log
.
info
(
'复制docker-compose.yml文件到/data/upgrade下'
)
log
.
info
(
'复制docker-compose.yml文件到/data/upgrade下'
)
ShellManage
()
.
exec_shell
(
'cp -f ./docker-compose.yml /data/upgrade/docker-compose.yml'
)
ShellManage
()
.
exec_shell
(
'cp -f ./docker-compose.yml /data/upgrade/docker-compose.yml'
)
log
.
info
(
'*********************************升级结束*********************************'
)
ShellManage
()
.
exec_shell
(
'cp -f /huansi/gitlab-runner/builds/analysis_file_to_hsright.py /data/upgrade/docker-compose.yml/analysis_file_to_hsright.py'
)
ShellManage
()
.
exec_shell
(
'cp -f /huansi/gitlab-runner/builds/analysis_file_to_nginx.py /data/upgrade/docker-compose.yml/analysis_file_to_nginx.py'
)
ShellManage
()
.
exec_shell
(
'cp -f /huansi/gitlab-runner/builds/base_util.py /data/upgrade/docker-compose.yml/base_util.py'
)
ShellManage
()
.
exec_shell
(
'cp -f /huansi/gitlab-runner/builds/app.conf /data/upgrade/docker-compose.yml/app.conf'
)
log
.
info
(
'*********************************打包结束*********************************'
)
# log.info('开始上传镜像和脚本文件')
# log.info('开始上传镜像和脚本文件')
# ssh = SSHConnection(host='localhost', port=1111, username='root', pwd='huansi.net')
# ssh = SSHConnection(host='localhost', port=1111, username='root', pwd='huansi.net')
# ssh.connect()
# ssh.connect()
...
...
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