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
0e3b953f
Commit
0e3b953f
authored
Apr 09, 2020
by
金凯强
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提示位置修改
上传配置之前创建目录
parent
468aa76c
Pipeline
#22393
passed with stage
in 22 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
upgrade_service.py
app/upgrade/upgrade_service.py
+3
-1
No files found.
app/upgrade/upgrade_service.py
View file @
0e3b953f
...
@@ -386,8 +386,8 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
...
@@ -386,8 +386,8 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
out
,
err
=
ssh
.
exec_command
(
'cat /huansi/upgrade/huansi.sh'
)
out
,
err
=
ssh
.
exec_command
(
'cat /huansi/upgrade/huansi.sh'
)
if
err
:
if
err
:
logger
.
info
(
'远程升级失败'
)
logger
.
info
(
'温馨提示:现在的模式为配置文件和app分开上传,防止手误导致客户服务器配置出错,一车间的程序连到二车间的数据库,所以升级之前要先上传配置文件'
)
logger
.
info
(
'温馨提示:现在的模式为配置文件和app分开上传,防止手误导致客户服务器配置出错,一车间的程序连到二车间的数据库,所以升级之前要先上传配置文件'
)
logger
.
info
(
'远程升级失败'
)
raise
HSException
(
'服务器配置文件未上传,升级之前要先上传配置文件'
)
raise
HSException
(
'服务器配置文件未上传,升级之前要先上传配置文件'
)
else
:
else
:
...
@@ -470,6 +470,8 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
...
@@ -470,6 +470,8 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
password
=
remote_server_info
[
'server_password'
])
password
=
remote_server_info
[
'server_password'
])
with
ssh_conenct
as
ssh
:
with
ssh_conenct
as
ssh
:
# 新建目录
ssh
.
exec_command
(
'mkdir -p /huansi/upgrade/'
)
ssh
.
upload
(
os
.
path
.
join
(
profile_dir
,
'huansi_server.sh'
),
'/huansi/upgrade/huansi.sh'
)
ssh
.
upload
(
os
.
path
.
join
(
profile_dir
,
'huansi_server.sh'
),
'/huansi/upgrade/huansi.sh'
)
return
{
'message'
:
'上传成功'
}
return
{
'message'
:
'上传成功'
}
...
...
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