Commit 4040c332 authored by 金凯强's avatar 金凯强 🎨

远程升级端获取日志

parent aa9ae964
Pipeline #22428 passed with stage
in 22 seconds
...@@ -65,12 +65,15 @@ if __name__ == '__main__': ...@@ -65,12 +65,15 @@ if __name__ == '__main__':
app_str = app_list_str[len('# app_list: "'):-1] app_str = app_list_str[len('# app_list: "'):-1]
if app_str == '*': if app_str == '*':
res = os.system('''export HUANSI_REGISTRY_URL=47.110.145.204:8084 &&\ upgrade_cmd = '''export HUANSI_REGISTRY_URL=47.110.145.204:8084 &&\
source /huansi/upgrade/huansi.sh &&\ source /huansi/upgrade/huansi.sh &&\
docker-compose -p deploy up -d --force-recreate''') docker-compose -p deploy up -d --force-recreate'''
else: else:
res = os.system('''export HUANSI_REGISTRY_URL=47.110.145.204:8084 &&\ upgrade_cmd = '''export HUANSI_REGISTRY_URL=47.110.145.204:8084 &&\
source /huansi/upgrade/huansi.sh &&\ source /huansi/upgrade/huansi.sh &&\
docker-compose -p deploy up -d --force-recreate --no-deps {}'''.format(app_str)) docker-compose -p deploy up -d --force-recreate --no-deps {}'''.format(app_str)
if res == 1: raise RuntimeError('程序升级失败') with os.popen(upgrade_cmd) as f:
result = f.read()
print('升级结果:{}'.format(result))
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