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
bd7124c7
Commit
bd7124c7
authored
Apr 08, 2020
by
金凯强
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复work_shop_no报错
parent
b2fd772e
Pipeline
#22285
failed with stage
in 11 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
upgarde_api.py
app/upgrade/upgarde_api.py
+3
-3
upgrade_service.py
app/upgrade/upgrade_service.py
+4
-4
No files found.
app/upgrade/upgarde_api.py
View file @
bd7124c7
...
...
@@ -59,11 +59,11 @@ class UpgradeAPI(ApiController):
'''
return
UpgradeService
()
.
package_images
(
log_id
)
@
api
(
'compare_image_info/<string:project_no>'
)
def
get_compare_image_info
(
self
,
project_no
):
@
api
(
'compare_image_info/<string:project_no>
/<string:work_shop_no>
'
)
def
get_compare_image_info
(
self
,
project_no
,
work_shop_no
):
'''
获取服务器和本地要推送的镜像对比
:param project_no:
:return:
'''
return
UpgradeService
()
.
get_compare_image_info
(
project_no
)
return
UpgradeService
()
.
get_compare_image_info
(
project_no
,
work_shop_no
)
app/upgrade/upgrade_service.py
View file @
bd7124c7
...
...
@@ -133,7 +133,7 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
# 找到服务器ip
# 上传app包到服务器
remote_server_info
=
ConnectionService
()
.
get_remote_server_info
(
project_no
)
remote_server_info
=
ConnectionService
()
.
get_remote_server_info
(
project_no
,
work_shop_no
)
if
not
remote_server_info
:
logger
.
info
(
'远程升级失败'
)
raise
HSException
(
'远端服务器信息未查到,请先配置'
)
...
...
@@ -458,7 +458,7 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
logger
.
info
(
'远程升级失败'
)
raise
HSException
(
'数据库连接失败'
)
# 查询远程配置信息
remote_server_info
=
conncetion_service
.
get_remote_server_info
(
project_no
)
remote_server_info
=
conncetion_service
.
get_remote_server_info
(
project_no
,
work_shop_no
)
# 上传文件
if
not
remote_server_info
:
logger
.
info
(
'远程升级失败'
)
...
...
@@ -474,7 +474,7 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
return
{
'message'
:
'上传成功'
}
def
get_compare_image_info
(
self
,
project_no
):
def
get_compare_image_info
(
self
,
project_no
,
work_shop_no
):
'''
获取服务器和本地要推送的镜像对比
:param project_no:
...
...
@@ -482,7 +482,7 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
'''
conncetion_service
=
ConnectionService
()
# 查询远程配置信息
remote_server_info
=
conncetion_service
.
get_remote_server_info
(
project_no
)
remote_server_info
=
conncetion_service
.
get_remote_server_info
(
project_no
,
work_shop_no
)
# 上传文件
if
not
remote_server_info
:
logger
.
info
(
'远程升级失败'
)
...
...
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