Commit 5a2f20b1 authored by 金凯强's avatar 金凯强 🎨

runner的文件写入修改

parent 7eafcd6b
......@@ -41,10 +41,11 @@ class InstallService(HSBaseUCService):
def _edit_runner_setting(self):
os.system("sudo chmod 777 /etc/gitlab-runner/config.toml")
with open('/etc/gitlab-runner/config.toml', 'w+') as f:
with open('/etc/gitlab-runner/config.toml', 'r') as f:
s = f.read()
a = s.replace('volumes = ["/cache"]',
'volumes = ["/var/run/docker.sock:/var/run/docker.sock","/etc/profile.d/huansi.sh:/etc/profile.d/huansi.sh" ,"/cache","/huansi/gitlab-runner/builds:/builds/hs"]')
with open('/etc/gitlab-runner/config.toml', 'w') as f:
f.write(a)
def _remove_old_runner_container(self):
......@@ -85,7 +86,6 @@ class InstallService(HSBaseUCService):
InstallDocker(ssh).run()
docker_service = '''[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
......
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