{"id":1690,"date":"2023-03-25T11:48:30","date_gmt":"2023-03-25T03:48:30","guid":{"rendered":""},"modified":"2023-03-25T11:48:30","modified_gmt":"2023-03-25T03:48:30","slug":"GitLab \u5b89\u88c5","status":"publish","type":"post","link":"https:\/\/bianchenghao6.com\/1690.html","title":{"rendered":"GitLab \u5b89\u88c5"},"content":{"rendered":"
\n
\u5904\u7406\u9879\u76ee\u7684\u6e90\u4ee3\u7801\u5386\u53f2<\/span> <\/code>\n <\/div>\n <\/code>\n <\/div>\n <\/code>\n <\/div>\n <\/p>\n <\/span> <\/span> <\/span> <\/span> <\/code>\n <\/div>\n <\/code>\n <\/div>\n <\/code>\n <\/div>\n <\/code>\n <\/div>\n <\/code>\n <\/div>\n <\/code>\n <\/div>\n <\/code>\n <\/div>\n <\/code>\n <\/div>\n <\/code>\n <\/div>\n <\/code>\n <\/div>\n <\/code>\n <\/div>\n <\/body>
\n \u8ddf\u8e2a\u5bf9\u6587\u4ef6\u6240\u505a\u7684\u66f4\u6539<\/span>
\n \u5feb\u901f\u9ad8\u6548\u5730\u5904\u7406\u5927\u5c0f\u9879\u76ee<\/span>
\n \u5728\u4e0d\u540c\u7684\u9879\u76ee\u4e0a\u4e0e\u5176\u4ed6\u5f00\u53d1\u8005\u5408\u4f5c<\/span> <\/p>\n\u5728 Windows \u4e0a\u5b89\u88c5 GitLab\uff1a<\/h2>\n
\n gitlab-runner.exe<\/i>\u3002\n <\/div>\nC:\\GitLab-Runner>gitlab-runner.exe register\n<\/pre>\n
Please enter the gitlab-ci coordinator URL (e.g. https:\/\/gitlab.com<\/span>\/):<\/span>\nhttps:\/\/gitlab.com\n<\/pre>\n
Please enter the gitlab-ci token for <\/span>this<\/span> runner:\nxxxxx\n<\/pre>\n
\n
\n <\/p>\n
\n
\n <\/p>\n
\n \u8bbe\u7f6e<\/i>\u6807\u7b7e\u4e0b\u7684
\n CI\/CD<\/i>\u9009\u9879\u5e76\u5c55\u5f00
\n Runners\u8bbe\u7f6e<\/i>\u9009\u9879\u3002\n <\/div>\n
\n
\n <\/p>\n
\n Runners Settings<\/i> \u90e8\u5206\u4e0b\uff0c\u60a8\u5c06\u83b7\u5f97\u5982\u4e0b\u56fe\u6240\u793a\u7684\u4ee4\u724c-\n <\/div>\n
\n <\/p>\n
Please enter the gitlab-ci description for <\/span>this<\/span> runner:\n[Admin-PC]: Hello GitLab Runner\n<\/pre>\n
Please enter the gitlab-ci tags for <\/span>this<\/span> runner (comma separated):\ntag1, tag2\n<\/pre>\n
Whether to lock the Runner to current project [true\/false]:\n[true]: true<\/span><\/span>\n<\/pre>\n
Please enter the executor: parallels, shell, docker+machine, kubernetes, docker-\nssh+machine, docker, docker-ssh, ssh, virtualbox:\ndocker\n<\/pre>\n
Please enter the default <\/span>Docker image (e.g. ruby:2.1):\nalpine:latest\n<\/pre>\n
<\/p>\n
\n Settings<\/i> \u90e8\u5206\u4e0b\u7684
\n CI\/CD<\/i> \u9009\u9879\uff0c\u60a8\u5c06\u770b\u5230\u6fc0\u6d3b\u7684 Runners\u7528\u4e8e\u9879\u76ee\u3002\n <\/div>\n <\/p>\n
\n GitLab-Runner<\/i> \u6587\u4ef6\u5939\u4e0b\u7684
\n config.toml<\/i> \u6587\u4ef6\u4e2d\u770b\u5230 GitLab Runner \u914d\u7f6e\uff0c\u5982\u4e0b\u6240\u793a-\n <\/div>\nconcurrent = 1\ncheck_interval = 0\n[[runners]]\n name = \"Hello GitLab Runner\"<\/span>\n url = \"https:\/\/gitlab.com\"<\/span><\/span>\n token = \"40ceed29eec231fa9e306629cae4d7\"<\/span>\n executor = \"docker\"<\/span>\n [runners.docker]\n tls_verify = false<\/span>\n image = \"alpine:latest\"<\/span>\n privileged = false<\/span>\n disable_cache = false<\/span>\n volumes = [\"\/cache\"<\/span>]\n shm_size = 0\n [runners.cache]\n<\/pre>\n
\u5728 Ubuntu \u4e0a\u5b89\u88c5 GitLab<\/h2>\n
\n Omnibus<\/i> \u5305\u5b89\u88c5\u5728 Ubuntu \u7cfb\u7edf\u4e0a\uff0c\u8be5\u5305\u63d0\u4f9b\u4e0d\u540c\u7684\u670d\u52a1\u6765\u8fd0\u884c GitLab\u3002 Omnibus \u5305\u63d0\u4f9b\u4e86 GitLab \u7684\u5fc5\u8981\u7ec4\u4ef6\uff0c\u5efa\u7acb\u4e86\u53ef\u4ee5\u5728\u7528\u6237\u7cfb\u7edf\u4e2d\u4f7f\u7528\u7684\u914d\u7f6e\u548c\u9879\u76ee\u5143\u6570\u636e\u3002\n <\/div>\nwget https:\/\/downloads-packages.s3.amazonaws.com\/ubuntu-14.04\/gitlab-ce_7.10.4~omnibus-1_amd64.deb<\/span>\n<\/pre>\n
<\/p>\n
sudo <\/span>apt-get install postfix\n<\/pre>\n
<\/p>\n
\n Internet \u7ad9\u70b9<\/i> \u9009\u9879\u3002\u63a5\u4e0b\u6765\uff0c\u5b83\u5c06\u663e\u793a Postfix \u914d\u7f6e\u4ee5\u53ca\u7cfb\u7edf\u90ae\u4ef6\u540d\u79f0\uff0c\u5982\u56fe\u6240\u793a-\n <\/div>\n <\/p>\n
sudo <\/span>dpkg-i gitlab-ce_7.10.4~omnibus-1_amd64.deb\n<\/pre>\n
<\/p>\n
sudo <\/span>gitlab-ctl reconfigure\n<\/pre>\n
sudo <\/span>gitlab-ctl status\n<\/pre>\n
\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"GitLab \u5b89\u88c5zh-cn","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[151],"tags":[],"class_list":["post-1690","post","type-post","status-publish","format-standard","hentry","category-gitlabjc"],"_links":{"self":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts\/1690"}],"collection":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/comments?post=1690"}],"version-history":[{"count":0,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/posts\/1690\/revisions"}],"wp:attachment":[{"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/media?parent=1690"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/categories?post=1690"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bianchenghao6.com\/wp-json\/wp\/v2\/tags?post=1690"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}