Commit 0e3b953f authored by 金凯强's avatar 金凯强 🎨

提示位置修改

上传配置之前创建目录
parent 468aa76c
Pipeline #22393 passed with stage
in 22 seconds
......@@ -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')
if err:
logger.info('远程升级失败')
logger.info('温馨提示:现在的模式为配置文件和app分开上传,防止手误导致客户服务器配置出错,一车间的程序连到二车间的数据库,所以升级之前要先上传配置文件')
logger.info('远程升级失败')
raise HSException('服务器配置文件未上传,升级之前要先上传配置文件')
else:
......@@ -470,6 +470,8 @@ docker-compose -f /data/upgrade_tools_data/backup/{upgrade_no}/docker-compose.ym
password=remote_server_info['server_password'])
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')
return {'message': '上传成功'}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment