{"id":243,"date":"2018-11-08T13:33:48","date_gmt":"2018-11-08T10:33:48","guid":{"rendered":"https:\/\/artem.services\/?p=243"},"modified":"2018-11-08T13:33:48","modified_gmt":"2018-11-08T10:33:48","slug":"gitlab-ci-%d1%83%d1%81%d1%82%d0%b0%d0%bd%d0%be%d0%b2%d0%ba%d0%b0-%d1%81%d0%be%d0%b1%d1%81%d1%82%d0%b2%d0%b5%d0%bd%d0%bd%d0%be%d0%b3%d0%be-runner%d0%b0","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=243","title":{"rendered":"GitLab CI &#8212; \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e runner&#8217;\u0430"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-244\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2018\/11\/GitLab-CI-Logo.png\" alt=\"\" width=\"1920\" height=\"683\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2018\/11\/GitLab-CI-Logo.png 1920w, https:\/\/artem.services\/wp-content\/uploads\/2018\/11\/GitLab-CI-Logo-300x107.png 300w, https:\/\/artem.services\/wp-content\/uploads\/2018\/11\/GitLab-CI-Logo-768x273.png 768w, https:\/\/artem.services\/wp-content\/uploads\/2018\/11\/GitLab-CI-Logo-1024x364.png 1024w, https:\/\/artem.services\/wp-content\/uploads\/2018\/11\/GitLab-CI-Logo-954x339.png 954w, https:\/\/artem.services\/wp-content\/uploads\/2018\/11\/GitLab-CI-Logo-1354x482.png 1354w\" sizes=\"(max-width: 1920px) 100vw, 1920px\" \/><\/p>\n<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c:<\/p>\n<p>\u0414\u043b\u044f <strong>DEB<\/strong> \u0441\u0438\u0441\u0442\u0435\u043c:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncurl -L https:\/\/packages.gitlab.com\/install\/repositories\/runner\/gitlab-runner\/script.deb.sh | sudo bash\r\n<\/pre>\n<p>\u0414\u043b\u044f <strong>RPM<\/strong> \u0441\u0438\u0441\u0442\u0435\u043c:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ncurl -s https:\/\/packages.gitlab.com\/install\/repositories\/runner\/gitlab-runner\/script.rpm.sh | sudo bash\r\n<\/pre>\n<p>\u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0434\u043b\u044f <strong>GitLab Runner<\/strong>, \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0430\u043c <strong>runner<\/strong>:<\/p>\n<p>\u0414\u043b\u044f <strong>DEB<\/strong> \u0441\u0438\u0441\u0442\u0435\u043c:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo apt install gitlab-runner\r\n<\/pre>\n<p>\u0414\u043b\u044f <strong>CentOS<\/strong>\/<strong>RHEL<\/strong>:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo yum install gitlab-runner\r\n<\/pre>\n<p><!--more--><\/p>\n<p>\u0412 <strong>gitlab.com<\/strong> \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432\u043e \u0432\u043a\u043b\u0430\u0434\u043a\u0443: <strong>Setting<\/strong> &#8212; <strong>CI<\/strong>\/<strong>CD<\/strong>, \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <strong>Runners<\/strong> \u0438 \u043d\u0430\u0436\u0430\u0442\u044c <strong>Expend<\/strong>. \u0412\u044b\u0431\u0440\u0430\u0442\u044c &quot;<strong>Disable shared runner<\/strong>&quot;. \u0422\u0430\u043a \u0436\u0435 \u0432 \u044d\u0442\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0435 \u0438\u0449\u0435\u043c \u0441\u0432\u043e\u0439 <strong>Token ID<\/strong>.<\/p>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo gitlab-runner register -n \\\r\n--url https:\/\/gitlab.com\/ \\\r\n--registration-token TOKEN_ID \\\r\n--executor shell \\\r\n--description &quot;MY RUNNER&quot;\r\n<\/pre>\n<p>\u0413\u0434\u0435 <strong>TOKEN_ID<\/strong> &#8212; \u0432\u0430\u0448 <strong>ID<\/strong> \u0441 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u0448\u0430\u0433\u0430.<\/p>\n<p>\u0421\u0447\u0438\u0442\u0430\u0435\u043c, \u0447\u0442\u043e <a href=\"https:\/\/artem.services\/?p=22\" target=\"_blank\" rel=\"noopener\">Docker \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d<\/a> \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435.<\/p>\n<p>\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <strong>gitlab-runner<\/strong> \u0432 \u0433\u0440\u0443\u043f\u043f\u0443 <strong>docker<\/strong>:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo usermod -aG docker gitlab-runner\r\n<\/pre>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0435\u0441\u0442\u044c \u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f <strong>gitlab-runner<\/strong> \u043a \u0434\u043e\u043a\u0435\u0440\u0443, \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nsudo -u gitlab-runner -H docker info\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c: \u0414\u043b\u044f DEB \u0441\u0438\u0441\u0442\u0435\u043c: \u0414\u043b\u044f RPM \u0441\u0438\u0441\u0442\u0435\u043c: \u0421\u043a\u0440\u0438\u043f\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0434\u043b\u044f GitLab Runner, \u0442\u0435\u043f\u0435\u0440\u044c \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0441\u0430\u043c runner: \u0414\u043b\u044f DEB \u0441\u0438\u0441\u0442\u0435\u043c: \u0414\u043b\u044f CentOS\/RHEL:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[37,2],"tags":[39,38,40],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/243"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=243"}],"version-history":[{"count":1,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/243\/revisions"}],"predecessor-version":[{"id":245,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/243\/revisions\/245"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}