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
a7c69b9c
Commit
a7c69b9c
authored
Mar 14, 2020
by
金凯强
🎨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试
parent
8163e547
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
install_service.py
app/install/install_service.py
+7
-2
No files found.
app/install/install_service.py
View file @
a7c69b9c
...
@@ -47,13 +47,14 @@ class InstallService(HSBaseUCService):
...
@@ -47,13 +47,14 @@ class InstallService(HSBaseUCService):
:param HSCUSCODE:
:param HSCUSCODE:
:return:
:return:
'''
'''
# 测试下载时间
time
.
sleep
(
20
)
return
{
"message"
:
"runner注册成功"
,
"step"
:
"1"
,
"status"
:
"running"
,
"later_message"
:
"正在修改runner配置..."
}
conncetion_service
=
ConnectionService
()
conncetion_service
=
ConnectionService
()
project_info
=
conncetion_service
.
get_project_info
()
project_info
=
conncetion_service
.
get_project_info
()
if
not
project_info
:
if
not
project_info
:
raise
HSException
(
'项目信息未查到,请先配置'
)
raise
HSException
(
'项目信息未查到,请先配置'
)
project_code
=
project_info
[
'project_no'
]
project_code
=
project_info
[
'project_no'
]
# 测试下载时间
time
.
sleep
(
20
)
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 -t -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
\
...
@@ -70,6 +71,8 @@ class InstallService(HSBaseUCService):
...
@@ -70,6 +71,8 @@ class InstallService(HSBaseUCService):
:param HSCUSCODE:
:param HSCUSCODE:
:return:
:return:
'''
'''
time
.
sleep
(
1
)
return
{
"message"
:
"runner配置修改成功"
,
"step"
:
"2"
,
"status"
:
"running"
,
"later_message"
:
"正在重启runner..."
}
self
.
_edit_runner_setting
()
self
.
_edit_runner_setting
()
self
.
_remove_old_runner_container
()
self
.
_remove_old_runner_container
()
...
@@ -81,6 +84,8 @@ class InstallService(HSBaseUCService):
...
@@ -81,6 +84,8 @@ class InstallService(HSBaseUCService):
:param HSCUSCODE:
:param HSCUSCODE:
:return:
:return:
'''
'''
time
.
sleep
(
1
)
return
{
"message"
:
"runner重启成功"
,
"step"
:
"3"
,
"status"
:
"success"
}
self
.
start_runner
()
self
.
start_runner
()
return
{
"message"
:
"runner重启成功"
,
"step"
:
"3"
,
"status"
:
"success"
}
return
{
"message"
:
"runner重启成功"
,
"step"
:
"3"
,
"status"
:
"success"
}
...
...
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