{"id":291260,"date":"2018-10-24T09:25:02","date_gmt":"2018-10-24T05:25:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=291260"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=291260","title":{"rendered":"CI\/CD \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u043e\u0433\u043e \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u0430"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/me\/k6\/u3\/mek6u38n__xg7yzyqtfbnyqpkio.png\"><\/div>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 powershell \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0441\u0440\u0435\u0434\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c\u0438 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 win \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0441 git, gitlab, ci\/cd \u0438 \u043f\u0440\u043e\u0447\u0438\u043c\u0438 devops \u0437\u0430\u043c\u043e\u0440\u043e\u0447\u043a\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u043b\u0438 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435<\/h4>\n<p>  <\/p>\n<ul>\n<li>\u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u043d\u043e\u0441\u0442\u0438;<\/li>\n<li>\u043d\u0435\u0441\u043e\u0433\u043b\u0430\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0441\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c\u0438 \u043f\u0440\u0438 \u0434\u043e\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432;<\/li>\n<li>\u043f\u043e\u0442\u0435\u0440\u044f \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043f\u0440\u0438 \u0443\u0445\u043e\u0434\u0435 \u043a\u043e\u043b\u043b\u0435\u0433;<\/li>\n<li>\u0440\u0443\u0447\u043d\u0430\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0432 \u043c\u0435\u0441\u0442\u0430 \u0438\u0445 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f;<\/li>\n<li>\u0431\u0430\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u0431\u0430\u0440\u0434\u0430\u043a.<\/li>\n<\/ul>\n<p>  \u0412\u0441\u0435 \u044d\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u043c\u0435\u043b\u043e\u0447\u043d\u044b \u0432 \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445, \u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u0432\u0441\u0435 \u044d\u0442\u043e \u0443\u0436\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0430\u0445 \u043a\u043e\u043c\u0430\u043d\u0434\u044b \u0438 \u043a\u0443\u0447\u0438 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043d\u0430\u0432\u0435\u0441\u0442\u0438 \u0432 \u044d\u0442\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043e\u043a. <br \/>  \u0414\u043b\u044f \u0443\u043f\u0440\u043e\u0449\u0435\u043d\u0438\u044f \u0436\u0438\u0437\u043d\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0437\u0430\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0434\u0443\u043a\u0442 Gitlab, \u0443\u0436\u0435 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0439 \u0443 \u043d\u0430\u0441 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043a\u043e\u0434\u0435\u0440\u0430\u043c\u0438. \u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c <a href=\"https:\/\/about.gitlab.com\/installation\/\">\u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 gitlab<\/a> \u0438 <a href=\"https:\/\/docs.gitlab.com\/runner\/install\/windows.html\">gitlab-runner<\/a>, \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0442\u043e\u0447\u043d\u044e \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 <a href=\"https:\/\/docs.gitlab.com\/ee\/administration\/auth\/how_to_configure_ldap_gitlab_ce\/\">gitlab \u0441 \u0434\u043e\u043c\u0435\u043d\u043d\u043e\u0439 \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0435\u0439<\/a> \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 runner \u043d\u0430 windows \u0441 <a href=\"https:\/\/docs.gitlab.com\/runner\/executors\/\">powershell executor<\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c \u043d\u0430\u0448\u0438 \u0437\u0430\u0434\u0430\u0447\u0438 \u0440\u0430\u0437\u0432\u0435\u0440\u0442\u044b\u0432\u0430\u043d\u0438\u044f. \u0414\u043b\u044f \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 <a href=\"https:\/\/code.visualstudio.com\/\">Visual Studio Code<\/a>.<\/p>\n<h4>\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0443\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 gitlab<\/h4>\n<p>  \u0418 \u0442\u0430\u043a \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c, \u0434\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u0443 \u0432 gitlab, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u043e\u0439\u0434\u0443\u0442 \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0435 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u044b.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b<\/b><\/p>\n<div class=\"spoiler_text\"><a href=\"https:\/\/habrastorage.org\/webt\/u8\/ub\/ao\/u8ubaox_csrnmtknmm0ro6b4bba.png\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/u8\/ub\/ao\/u8ubaox_csrnmtknmm0ro6b4bba.png\"><\/a>  <\/div>\n<\/div>\n<p>  \u0414\u0430\u043b\u0435\u0435 \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0430\u0448\u0438\u0445 \u043a\u043e\u043b\u043b\u0435\u0433 \u0432 Members \u0441 \u043f\u0440\u0430\u0432\u0430\u043c\u0438 Developer \u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0430\u0442\u044c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041f\u0440\u043e\u0435\u043a\u0442 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0432 \u043d\u0430\u0448\u0435\u0439 \u0433\u0440\u0443\u043f\u043f\u0435, \u0447\u0442\u043e \u0431\u044b \u043a \u043d\u0435\u043c\u0443 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430\u0448\u0438 \u043a\u043e\u043b\u043b\u0435\u0433\u0438.  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/b><\/p>\n<div class=\"spoiler_text\"><a href=\"https:\/\/habrastorage.org\/webt\/5y\/fl\/kc\/5yflkcyw1tk8dapbhyxvlwoozqg.png\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/5y\/fl\/kc\/5yflkcyw1tk8dapbhyxvlwoozqg.png\"><\/a>  <\/div>\n<\/div>\n<p>  \u041f\u043e\u0441\u043b\u0435 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u043d\u0430 \u043f\u0435\u0440\u0432\u043e\u0439 \u0436\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0447\u043a\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u0435 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438 \u043d\u0430 \u0442\u0435\u043c\u0443 \u00ab\u0447\u0442\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435\u00bb. \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0448\u0438\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u0444\u0430\u0439\u043b\u044b \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0432 gitlab. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u0441\u0435 \u044d\u0442\u043e \u043b\u0435\u0436\u0438\u0442 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u00abE:\\scripts\\powershellmegaproject\u00bb. \u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0439 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u043e\u0439 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043c \u043d\u0430 \u0441\u0432\u043e\u0435\u043c \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u0435:<\/p>\n<pre><code>cd E:\\scripts\\powershellmegaproject git init git remote add origin http:\/\/gitlab.domain.net\/sysadminsdev\/powershellmegaproject.git git add . git commit -m \"Initial commit\" git push -u origin master<\/code><\/pre>\n<p>  \u0411\u0438\u043d\u0433\u043e! \u0412\u0441\u0435 \u043d\u0430\u0448\u0438 \u0444\u0430\u0439\u043b\u0438\u043a\u0438 \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u00abE:\\scripts\\powershellmegaproject\u00bb \u0442\u0435\u043f\u0435\u0440\u044c \u0432 \u043d\u0430\u0448\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<br \/>  \u0427\u0442\u043e \u0434\u0430\u043b\u044c\u0448\u0435? \u041e\u0442\u043a\u0440\u043e\u0435\u043c VSCode \u0438 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043d\u0430\u0448 powershell \u0441\u043a\u0440\u0438\u043f\u0442, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0432 \u044d\u0442\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435. \u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0432 \u0444\u0430\u0439\u043b, \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u00abSource Control\u00bb \u0443\u0432\u0435\u0434\u043e\u043c\u043b\u0435\u043d\u0438\u0435, \u0433\u0434\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043a\u043e\u043c\u043c\u0438\u0442. \u0414\u0430\u043b\u0435\u0435 \u0434\u0435\u043b\u0430\u0435\u043c \u043f\u0443\u0448 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">vscode git<\/b><\/p>\n<div class=\"spoiler_text\"><a href=\"https:\/\/hsto.org\/webt\/t8\/a2\/ku\/t8a2kuu_4cxkrtg5kqea66fgygg.png\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/t8\/a2\/ku\/t8a2kuu_4cxkrtg5kqea66fgygg.png\"><\/a>  <\/div>\n<\/div>\n<p>  \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 gitlab, \u0442\u0430\u043c \u0431\u0443\u0434\u0435\u0442 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0444\u0430\u0439\u043b\u043e\u0432, \u0430 \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u043a\u043e\u043c\u043c\u0438\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0442\u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f. <\/p>\n<h4>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 CI\/CD<\/h4>\n<p>  \u041f\u043e\u0440\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440. \u0414\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b CI\/CD \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d runner. \u041d\u0430\u0437\u043d\u0430\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0432 \u0430\u0434\u043c\u0438\u043d\u043a\u0435 gitlab \u2014 runners, \u043b\u0438\u0431\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c shared runner`\u044b.<br \/>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443. \u0427\u0442\u043e \u0431\u044b CI\/CD \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435 \u0441 \u043d\u0430\u0448\u0438\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0444\u0430\u0439\u043b .gitlab-ci.yml \u0441 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 (\u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0443 \u0438 help \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u0443\u0432\u0438\u0434\u0435\u0442\u044c \u043f\u0440\u0438 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0435 \u0432 \u043c\u0435\u043d\u044e gitlab \u2014 CI\/CD \u2014 Pipelines). \u0414\u043b\u044f \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b, \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u0434\u043e rsync \u0438\u043b\u0438 git pull \u043d\u0430 \u043d\u0443\u0436\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439, \u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 powershell`\u043e\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0430\u043f\u043a\u0443 \u043d\u0430 \u0446\u0435\u043b\u0435\u0432\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u043c \u043e\u0431\u0449\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0439 \u0432 \u0441\u0435\u0442\u0438 \u0438 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043d\u0430 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u043f\u043e\u0434 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u043d\u0430\u0448\u0430 \u0441\u043b\u0443\u0436\u0431\u0430 gitlab-runner.<br \/>  \u0417\u0430\u043f\u043e\u043b\u043d\u0438\u043c .gitlab-ci.yml \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u044b\u043c:  <\/p>\n<pre><code>deploy_stage:   variables:     DEST_DIR: \\\\srv-megaserver\\scripts\\powershellmegaproject   script:     - remove-item -path $DEST_DIR\\* -recurse     - gci -Recurse | Copy-Item -Destination $DEST_DIR<\/code><\/pre>\n<p>  \u0422\u0443\u0442 \u043c\u044b \u0437\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043f\u0443\u0442\u044c \u0434\u043e \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 (\u0432 \u0434\u0440\u0443\u0433\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0438 \u043c\u0435\u043d\u044f\u0442\u044c \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433) \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 powershell \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0443\u0434\u0430\u043b\u0438\u043c \u0432\u0441\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430, \u0430 \u043f\u043e\u0442\u043e\u043c \u0441\u043a\u043e\u043f\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u0438\u0437 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u044d\u0442\u0443 \u043f\u0430\u043f\u043a\u0443.<br \/>  \u041a\u043e\u043c\u043c\u0438\u0442\u0438\u043c, \u043f\u0443\u0448\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c. \u0412 \u043d\u0430\u0448\u0435\u0439 \u043f\u0430\u043f\u043a\u0435 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0432\u0441\u0435 \u0444\u0430\u0439\u043b\u044b. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0441\u0442\u0430\u0442\u0443\u0441 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 Pipeline \u043c\u043e\u0436\u043d\u043e \u0432 \u0442\u043e\u043c \u0436\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043d\u0430\u0448\u0435\u0433\u043e gitlab \u2014 ci\/cd \u2014 pipelines, \u043f\u0440\u0438\u043c\u0435\u0440 \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0433\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f:  <\/p>\n<pre><code> Running with gitlab-runner 11.3.1~beta.4.g0aa5179e (0aa5179e)   on gl-runner2-windows a24eda81 Using Shell executor... Running on SRV-GL-RUNNER2... Fetching changes... HEAD is now at e6e9a2c update ci file From http:\/\/gitlab.domain.net\/sysadminsdev\/powershellmegaproject    e6e9a2c..5f5cfce  master     -&gt; origin\/master Checking out 5f5cfceb as master... Skipping Git submodules setup $ remove-item -path $DEST_DIR\\* -recurse $ gci -Recurse | Copy-Item -Destination $DEST_DIR Job succeeded<\/code><\/pre>\n<p>  <i>\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u043d\u0430 \u044d\u0442\u043e\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u0437\u0430\u0434\u0430\u043d\u0438\u0435 \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0438\u0437 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0432 \u043f\u043b\u0430\u043d\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0435, \u043a\u0430\u043a \u0438\u0442\u043e\u0433 \u043c\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/i><\/p>\n<h4>\u0427\u0442\u043e \u0441 \u043a\u043e\u043b\u043b\u0435\u0433\u0430\u043c\u0438?<\/h4>\n<p>  \u0412\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e, \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u0430\u043f\u043a\u0443 \u0434\u043b\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432, \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u043c \u0432 \u043d\u0435\u0451 \u0432 ps\/cmd \u0438 \u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043a \u0441\u0435\u0431\u0435.  <\/p>\n<pre><code> cd e:\\projects git clone http:\/\/gitlab.domain.net\/sysadminsdev\/powershellmegaproject.git <\/code><\/pre>\n<p>  \u0412\u0441\u0451, \u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0432 VSCode \u043e\u0442\u043a\u0440\u044b\u0432 \u043f\u0430\u043f\u043a\u0443, \u0434\u0435\u043b\u0430\u044f \u043a\u043e\u043c\u043c\u0438\u0442\u044b \u0438 \u043f\u0443\u0448\u0438.<\/p>\n<h4>\u0427\u0435\u0433\u043e \u043c\u044b \u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c \u0432 \u0438\u0442\u043e\u0433\u0435<\/h4>\n<p>  <\/p>\n<ul>\n<li>\u0432\u0441\u0435 \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0443 \u043d\u0430\u0441 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u0430\u0440\u0438\u0438;<\/li>\n<li>\u0432\u0441\u044f \u0433\u0440\u0443\u043f\u043f\u0430 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438;<\/li>\n<li>\u0432\u0441\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432\u0438\u0434\u043d\u044b \u0432 \u0438\u0441\u0442\u043e\u0440\u0438\u0438;<\/li>\n<li>\u043b\u044e\u0431\u043e\u0439 \u043d\u043e\u0432\u043e\u0438\u0441\u043f\u0435\u0447\u0435\u043d\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440 \u0441\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u0438\u0442 \u0432\u0441\u0435 \u043d\u0430\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0438 \u0435\u043c\u0443 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0431\u0435\u0433\u0430\u0442\u044c \u043f\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u043c \u0438 \u0443\u0437\u043d\u0430\u0432\u0430\u0442\u044c \u00ab\u0433\u0434\u0435-\u0447\u0442\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f\u00bb;<\/li>\n<li>\u0432\u0441\u0435 \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u044b\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u00ab\u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u044b\u00bb.<\/li>\n<\/ul>\n<p>  \u041c\u044b \u0443\u0441\u0442\u0440\u0430\u043d\u0438\u043b\u0438 \u0432\u0441\u0435 \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u043b\u0438 \u043d\u0430\u0448\u0443 \u0436\u0438\u0437\u043d\u044c \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435.<\/p>\n<h4>\u0411\u043e\u043d\u0443\u0441\u043e\u043c<\/h4>\n<p>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0444\u0430\u0439\u043b README.md \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0441 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u043c \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0447\u0442\u043e \u0432 \u044d\u0442\u0438\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u0445 \u0432\u043e\u043e\u0431\u0449\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442.<br \/>  \u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0444\u0430\u0439\u043b Changelog \u0434\u043b\u044f \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439.<\/p>\n<p>  <i>ps: \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0435? \u041c\u043e\u0436\u043d\u043e \u043a\u0440\u0443\u0442\u0438\u0442\u044c runner \u0432 docker, <a href=\"https:\/\/docs.ansible.com\/ansible\/2.5\/modules\/win_scheduled_task_module.html\">\u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0442\u044c scheduler \u0432 ansible<\/a>, \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u043c\u043d\u043e\u0433\u043e \u0447\u0435\u0433\u043e \u0438 \u043f\u043e \u0441\u043b\u043e\u0436\u043d\u0435\u0439, \u043d\u043e \u0446\u0435\u043b\u044c\u044e \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u044b\u043b\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u0434\u043b\u044f \u043d\u043e\u0432\u0438\u0447\u043a\u043e\u0432.<\/i><\/div>\n<p>        <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d()}}}t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>     <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/post\/427377\/\"> https:\/\/habr.com\/post\/427377\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\">\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/me\/k6\/u3\/mek6u38n__xg7yzyqtfbnyqpkio.png\"><\/div>\n<p>  \u0412 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0438\u0434\u0435\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0443 powershell \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443 \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u0441\u0440\u0435\u0434\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0445 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0441\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430\u043c\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u043c\u0438 \u043d\u0430 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u0445. \u0421\u0442\u0430\u0442\u044c\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u0430 \u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 win \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u043d\u0435\u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0445 \u0433\u043b\u0443\u0431\u043e\u043a\u043e \u0441 git, gitlab, ci\/cd \u0438 \u043f\u0440\u043e\u0447\u0438\u043c\u0438 devops \u0437\u0430\u043c\u043e\u0440\u043e\u0447\u043a\u0430\u043c\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0435\u0441\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043f\u0440\u043e\u0448\u0443 \u043f\u043e\u0434 \u043a\u0430\u0442.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-291260","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/291260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=291260"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/291260\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=291260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=291260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=291260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}