Commit 458153d8 authored by 金凯强's avatar 金凯强 🎨

the input device is not a TTY 错误修复

parent ca910de9
...@@ -12,18 +12,16 @@ if __name__ == '__main__': ...@@ -12,18 +12,16 @@ if __name__ == '__main__':
# res = requests.post('http://localhost:5000/authorization/login/',json=data) # res = requests.post('http://localhost:5000/authorization/login/',json=data)
# print(res.json()) # print(res.json())
# #
# 获取项目链接 # # 获取项目链接
res = requests.get('http://localhost:5000/connection/') # res = requests.get('http://localhost:5000/connection/')
print(res.json())
#
# json_data = {"project_no": "jkq_test", "db_ip": "47.97.206.38", "db_port": "9610", "db_user": "huansi",
# "db_password": "huansi", "mes_db_name": "HSGmtMes", "tiip_db_name": "HSTIIP",
# "host_ip": "192.168.4.116","id":"1237937496479928320"}
#
# # 设置项目链接
# res = requests.post('http://localhost:5000/connection/', json=json_data)
# print(res.json()) # print(res.json())
# #
json_data = {}
# 设置项目链接
res = requests.post('http://localhost:5000/connection/', json=json_data)
print(res.json())
#
# # 测试项目数据库连接 # # 测试项目数据库连接
# res = requests.get('http://localhost:5000/connection/jkq_test/HSGmtMEs/') # res = requests.get('http://localhost:5000/connection/jkq_test/HSGmtMEs/')
# print(res.json()) # print(res.json())
...@@ -36,9 +34,9 @@ if __name__ == '__main__': ...@@ -36,9 +34,9 @@ if __name__ == '__main__':
# res = requests.post('http://localhost:5000/connection/remote_server/', json=json_data) # res = requests.post('http://localhost:5000/connection/remote_server/', json=json_data)
# print(res.json()) # print(res.json())
# #
# 获取远程服务器连接 # # 获取远程服务器连接
res = requests.get('http://localhost:5000/connection/remote_server/') # res = requests.get('http://localhost:5000/connection/remote_server/')
print(res.json()) # print(res.json())
# #
# # 测试端口是否开放 # # 测试端口是否开放
# res = requests.get('http://localhost:5000/connection/test_port/23002/') # res = requests.get('http://localhost:5000/connection/test_port/23002/')
......
...@@ -54,7 +54,7 @@ class InstallService(HSBaseUCService): ...@@ -54,7 +54,7 @@ class InstallService(HSBaseUCService):
raise HSException('项目信息未查到,请先配置') raise HSException('项目信息未查到,请先配置')
project_code = project_info['project_no'] project_code = project_info['project_no']
self.delete_setting_file() self.delete_setting_file()
s1 = os.system("docker run --rm -t -i -v /etc/gitlab-runner:/etc/gitlab-runner gitlab/gitlab-runner register \ s1 = os.system("docker run --rm -i -v /etc/gitlab-runner:/etc/gitlab-runner gitlab/gitlab-runner register \
-n -u http://47.110.145.204:8085/ -r WwpzH4qk19KjvAjEwoTz --executor docker --docker-image docker \ -n -u http://47.110.145.204:8085/ -r WwpzH4qk19KjvAjEwoTz --executor docker --docker-image docker \
--description huansi.{hscode} \ --description huansi.{hscode} \
--tag-list huansi.{hscode}".format(hscode=project_code)) --tag-list huansi.{hscode}".format(hscode=project_code))
......
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