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
458153d8
Commit
458153d8
authored
Mar 16, 2020
by
金凯强
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
the input device is not a TTY 错误修复
parent
ca910de9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
api_test.py
api_test.py
+11
-13
install_service.py
app/install/install_service.py
+1
-1
No files found.
api_test.py
View file @
458153d8
...
@@ -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/')
...
...
app/install/install_service.py
View file @
458153d8
...
@@ -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
))
...
...
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