{"id":350289,"date":"2023-07-14T15:03:32","date_gmt":"2023-07-14T15:03:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=350289"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=350289","title":{"rendered":"<span>Gitlab-ci \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0435 pipelines \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e enterprise<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u043c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041f\u0430\u043d\u043e\u0432 \u041c\u0438\u0445\u0430\u0438\u043b, \u044f <a href=\"https:\/\/career.habr.com\/companies\/mts\/vacancies\">DevOps\u2011\u0438\u043d\u0436\u0435\u043d\u0435\u0440<\/a> \u041c\u0422\u0421 Digital. \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u043e\u043f\u044b\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u00ab\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445\u00bb pipelines \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 gitlab-ci. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0439 CI\/CD, \u0438\u0437 \u0447\u0435\u0433\u043e \u043e\u043d \u0441\u043e\u0441\u0442\u043e\u0438\u0442, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u0435\u043d \u0438 \u043a\u0430\u043a \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8e4\/d72\/d2d\/8e4d72d2d6363fa165d8984b442744e2.png\" width=\"1560\" height=\"877\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8e4\/d72\/d2d\/8e4d72d2d6363fa165d8984b442744e2.png\"\/><\/figure>\n<h3>\u0427\u0430\u0441\u0442\u044c 1: \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u043b\u0430\u0441c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e gitlab-ci<\/h3>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0432\u044b \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442 \u043a\u0440\u0443\u043f\u043d\u044b\u0439 \u0441\u0442\u0440\u0438\u043c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u0430\u043d\u0434 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>Frontend;<\/p>\n<\/li>\n<li>\n<p>Backend;<\/p>\n<\/li>\n<li>\n<p>API.\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0434\u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Golang, \u0434\u0440\u0443\u0433\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u2013 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Gradle, \u0430 \u0435\u0449\u0435 Frontend \u0435\u0441\u0442\u044c. \u041d\u0443\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u0438 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435\u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f AWX \u0438\u043b\u0438 Terraform.<\/p>\n<p>\u0412 \u0442\u0430\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0410 \u043a\u0430\u043a\u00a0\u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435 \u044d\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c?\u00bb. \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0442\u0430\u043a\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 gitlab-ci.yml \u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u041d\u043e \u0442\u0443\u0442 \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u043c\u0441\u044f \u0441 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u043f\u0435\u0440\u0435\u043b\u043e\u0436\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u0443\u0434\u0430, \u0437\u0430\u0442\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e include \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. \u041d\u043e \u0438 \u0442\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438. \u0424\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 (test, build, deploy, etc).<\/p>\n<\/li>\n<\/ul>\n<p>\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0433\u0438\u0431\u043a\u043e\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0435, \u0447\u0442\u043e-\u0442\u043e, \u0447\u0442\u043e \u0434\u0430\u0441\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0432 \u043d\u0430\u0448\u0438 pipelines.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c.<\/p>\n<h3>\u0427\u0430\u0441\u0442\u044c 2: \u0422\u0438\u043f\u043e\u0432\u044b\u0435 gitlab-ci \u2013 \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435?<\/h3>\n<p>\u0422\u0438\u043f\u043e\u0432\u043e\u0439 gitlab-ci.yml, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0430\u043c\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e stage \u0438 job. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"yaml\">#\u041f\u0440\u0438\u043c\u0435\u0440 1 stages:     - test     - build     - deploy  test:job:     stage: test     image:         name: $IMAGE         entrypoint: []     script:         - echo \"test\"     rules:         if: $CI_COMMIT_BRANCH == \"master\"     varuables:         ENABLE: \"true\"     tags:         - prod-runner  build:job:     stage: build     image:         name: $IMAGE         entrypoint: []     dependencies: []     needs:         - test-job     script:         - echo \"build\"     rules:         if: $CI_COMMIT_BRANCH == \"master\"     varuables:         ENABLE: \"true\"     tags:         - prod-runner  deploy:job:     stage: deploy     image:         name: $IMAGE         entrypoint: []     dependencies:         - build-job     needs:         - test-job         - build-job     script:         - echo \"deploy\"     rules:         if: $CI_COMMIT_BRANCH == \"master\"     varuables:         ENABLE: \"true\"     tags:         - prod-runner <\/code><\/pre>\n<p>\u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043a\u0430\u0436\u0434\u0430\u044f job \u043d\u0435\u0441\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043a\u043e\u0434\u043e\u043c. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043d\u043e \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c\u0441\u044f \u00ab\u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u00bb \u0444\u0430\u0439\u043b\u0430.<\/p>\n<h4>\u041f\u0443\u043d\u043a\u0442 2.1: \u0422\u0435\u043e\u0440\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u0438 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0430, \u0440\u0430\u0437\u043e\u0431\u044c\u0435\u043c \u041f\u0440\u0438\u043c\u0435\u0440 1 \u043d\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0447\u0430\u0441\u0442\u0438.\u00a0<\/p>\n<p>Gitlab \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e: <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/yaml\/#include\">include<\/a> \u2013 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/yaml\/#extends\">extends<\/a> \u2013 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441\u0445\u043e\u0436\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u043a\u043e\u0434\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/yaml\/yaml_optimization.html#anchors\">anchors<\/a> \u2013 \u044f\u043a\u043e\u0440\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0438 \u043a\u043e\u0434\u0430 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/yaml\/yaml_optimization.html#reference-tags\">reference tags<\/a> \u2013 \u0441\u0441\u044b\u043b\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0441\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u044b (pipelines) \u043a\u0430\u043a \u00ab\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u00bb.<\/p>\n<h4>\u041f\u0443\u043d\u043a\u0442 2.2: \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0438 \u0442\u0435\u043e\u0440\u0438\u044f<\/h4>\n<p>\u0412\u0437\u0433\u043b\u044f\u043d\u0443\u0432 \u0435\u0449\u0435 \u0440\u0430\u0437 \u043d\u0430 \u041f\u0440\u0438\u043c\u0435\u0440 1, \u0432\u044b\u0434\u0435\u043b\u0438\u043c \u0447\u0430\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u0431\u043b\u043e\u043a \u043f\u0440\u0430\u0432\u0438\u043b (rules);<\/p>\n<\/li>\n<li>\n<p>\u0431\u043b\u043e\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (variables);<\/p>\n<\/li>\n<li>\n<p>\u0431\u043b\u043e\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432(before_script, script, after_script)\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b\u043d\u0435\u0441\u0435\u043c \u044d\u0442\u0438 \u0431\u043b\u043e\u043a\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"bash\">templates-repo\/ |--variables |   |--test-vars |   |  \u2514\u2500\u2500test-vars.gitlab-ci.yml |   |--build-vars |   |  \u2514\u2500\u2500build-vars.gitlab-ci.yml |   \u2514\u2500\u2500deploy-vars |      \u2514\u2500\u2500deploy-vars.gitlab-ci.yml |--rules |   |--test-rules |   |  \u2514\u2500\u2500test-rules.gitlab-ci.yml |   |--build-rules |   |  \u2514\u2500\u2500build-rules.gitlab-ci.yml |   \u2514\u2500\u2500deploy-rules |      \u2514\u2500\u2500deploy-rules.gitlab-ci.yml |--scripts |   |--test-scripts |   |  \u2514\u2500\u2500test-scripts.gitlab-ci.yml |   |--build-scripts |   |  \u2514\u2500\u2500build-scripts.gitlab-ci.yml |   \u2514\u2500\u2500deploy-scripts |      \u2514\u2500\u2500deploy-scripts.gitlab-ci.yml |--templates |   |--build-bin |   |  \u2514\u2500\u2500build-bin-template.gitlab-ci.yml |   |--build-image |   |  \u2514\u2500\u2500build-image-template.gitlab-ci.yml |   \u2514\u2500\u2500deploy |      \u2514\u2500\u2500deploy-template.gitlab-ci.yml |--entrypoints |   |--java |   |  |--mvn.gitlab-ci.yml |   |  \u2514\u2500\u2500gradle.gitlab-ci.yml |   |--golang |   |  \u2514\u2500\u2500golang.gitlab-ci.yml |   \u2514\u2500\u2500deploy |      \u2514\u2500\u2500deploy-template.gitlab-ci.yml<\/code><\/pre>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u0443\u044e job. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441\u043e\u0431\u0435\u0440\u0435\u043c job kaniko, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 jobs \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0442\u0430\u043a\u043e\u043c\u0443 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443.<\/p>\n<h4>\u041f\u0443\u043d\u043a\u0442 2.3: \u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0443\u044e job, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432:<\/p>\n<p>build-rules.gitlab-ci.yml<\/p>\n<pre><code class=\"yaml\">############# ## Changes ## #############  .changes-exclude-files-devops: &amp;changes-exclude-files-devops   - \".gitlab-ci.yml\"   - \"Dockerfile\"  ########### ## Rules ## ###########  .if-enable-build-kaniko-env: &amp;if-enable-build-kaniko-env   if: $ENABLE_KANIKO_BUILD == \"false\"  .if-enable-build-kaniko-tag-env: &amp;if-enable-build-kaniko-tag-env   if: $ENABLE_KANIKO_BUILD_TAG == \"false\"  .if-ci-branch-and-env-exist: &amp;if-ci-branch-and-env-exist   if: $CI_COMMIT_BRANCH =~ \/master|feature\\\/.*\/ &amp;&amp; $ENABLE_KANIKO_BUILD == \"true\"  .if-ci-tag-and-env-exist: &amp;if-ci-tag-and-env-exist   if: $CI_COMMIT_TAG =~ \/^(v[0-9]\\d*)\\.([0-9]\\d*)\\.([0-9]\\d*)(-([a-zA-Z-]*))?\/ &amp;&amp; $ENABLE_KANIKO_BUILD_TAG == \"true\"  .if-piplince-surce-push-or-merge-request: &amp;if-piplince-surce-push-or-merge-request   if: $CI_PIPELINE_SOURCE == \"push\" || $CI_PIPELINE_SOURCE == \"merge_request_event\"  .if-ci-commit-tag: &amp;if-ci-commit-tag   if: $CI_COMMIT_TAG  ################# ## Build rules ## #################  .rules:build-image:job:   rules:     - &lt;&lt;: *if-enable-build-kaniko-env       when: never     - &lt;&lt;: *if-piplince-surce-push-or-merge-request       changes: *changes-exclude-files-devops       when: never     - &lt;&lt;: *if-ci-commit-tag       when: never     - &lt;&lt;: *if-ci-branch-and-env-exist     - when: never <\/code><\/pre>\n<p>build-vars.gitlab-ci.yml<\/p>\n<pre><code class=\"yaml\">.variables:k8s:deploy:kaniko:   variables:     ENVIRONMENT: prod     IMAGE: kaniko:latest <\/code><\/pre>\n<p>build-scripts.gitlab-ci.yml<\/p>\n<pre><code class=\"yaml\">.script:infra-build-script:   script:     - 'echo \"Building docker image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA\"'     - \/kaniko\/executor         --context \"$CI_PROJECT_DIR\"         --dockerfile \"$CI_PROJECT_DIR\/.docker\/Dockerfile\"         --destination \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA\"         --cache=true --cache-ttl 336h         --label ru.mts.git.project=\"$CI_PROJECT_URL\"         --label ru.mts.git.ref=\"$CI_COMMIT_REF_NAME\"         --label ru.mts.git.revision=\"$CI_COMMIT_SHORT_SHA\"         --skip-tls-verify         --use-new-run         --registry-mirror=your.registry.com         --build-arg http_proxy=$http_proxy         --build-arg https_proxy=$https_proxy         --build-arg no_proxy=$no_proxy <\/code><\/pre>\n<p>\u0424\u0430\u0439\u043b \/templates\/build-image\/build-image-template.gitlab-ci.yml \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"yaml\">include:     - local: '\/scripts\/build-scripts\/build-scripts.gitlab-ci.yml'     - local: '\/rules\/build-rules\/build-rules.gitlab-ci.yml'     - local: '\/variables\/build-vars\/build-vars.gitlab-ci.yml'  build:kaniko:job:     stage: build-image     image:         name: $IMAGE         entrypoint: []     needs:         - job: test-job     dependencies: []     extends:         - .script:infra-build-script         - .rules:build-image:job         - .variables:k8s:deploy:kaniko     tags:         - prod-runner <\/code><\/pre>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e extends \u043c\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d scripts, rules \u0438 variables. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 job.<\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435 (\u041f\u0443\u043d\u043a\u0442 2.2 &#8212; \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430), \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f entrypoints\/, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b (templates) \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>\u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"yaml\">include:     - local: '\/templates\/build-bin\/build-bin-template.gitlab-ci.yml'     - local: '\/templates\/build-image\/build-image-template.gitlab-ci.yml'     - local: '\/templates\/deploy\/deploy-template.gitlab-ci.yml'  stages:     - test     - build     - deploy  # Global variables variables:     ENABLE_LINT: \"true\"     ENABLE_BUILD: \"true\"     ENABLE_DEPLOY_PROD: \"true\"     ENABLE_DEPLOY_TEST: \"true\"     ENABLE_DEPLOY_DEV: \"true\" <\/code><\/pre>\n<p>\u0422\u0443\u0442 \u043c\u044b \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u043c stages, includes, variables. \u0422\u043e \u0435\u0441\u0442\u044c \u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u00ab\u0432\u0435\u0440\u0445\u043d\u0435\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u043c\u00bb \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u043e\u043c \u0444\u0430\u0439\u043b\u0435.<\/p>\n<h4>\u041f\u0443\u043d\u043a\u0442 2.4: \u041d\u044e\u0430\u043d\u0441\u044b<\/h4>\n<p>\u041f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u043d\u044e\u0430\u043d\u0441\u0430\u043c \u044d\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0422\u0430\u043a \u043a\u0430\u043a Gitlab \u0443 \u0432\u0441\u0435\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044f \u2014 \u00ab\u043a\u043e\u043c\u043c\u0443\u043d\u0430\u043b\u044c\u043d\u044b\u0439\u00bb \u0438\u043b\u0438\u00a0\u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0439 \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u00a0\u0447\u0430\u0441\u0442\u0438 include. <a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/yaml\/#include\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a> \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e\u00a0\u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u00ab\u0438\u043d\u043f\u0443\u0442\u0430\u043c\u0438\u00bb:<\/p>\n<p><strong>Possible inputs: The include subkeys.\u00a0<\/strong><\/p>\n<p><strong>include:local<\/strong> \u2013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0445\u0441\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e;<\/p>\n<p><strong>include:project<\/strong> \u2013 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0442\u043e\u043d\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f;\u00a0<\/p>\n<p><strong>include:remote<\/strong> \u2013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438);<\/p>\n<p><strong>include:template<\/strong> \u2013 \u043e\u0442\u043c\u0435\u0442\u0430\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0441\u0430\u043c\u043e\u0433\u043e gitlab.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432:\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0443\u00a0\u0432\u0430\u0441 \u043e\u0442\u043a\u0440\u044b\u0442 \u0438 \u0432\u0441\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432\u00a0main (master) \u0432\u0435\u0442\u043a\u0435\u00a0\u2014 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f include:remote, \u0442\u0430\u043a \u043a\u0430\u043a\u00a0\u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430\u00a0\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u043e\u043d\u0430 \u0437\u0430\u0439\u043c\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043c\u0435\u0441\u0442\u0430 (\u0445\u043e\u0442\u044f, \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c\u00a0\u0431\u044b, \u043a\u0443\u0434\u0430 \u0435\u0449\u0435 \u043c\u0435\u043d\u044c\u0448\u0435?). \u0415\u0441\u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439(internal)\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 include:project.<\/p>\n<p>Include:project \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0432 \u0441\u0432\u043e\u0438\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445.<\/p>\n<p><strong>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 1.<\/strong> \u0415\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ansible, terraform, etc\u00a0\u2014 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430, \u0441 \u044f\u0432\u043d\u044b\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u043b\u0435\u0439:<\/p>\n<pre><code class=\"yaml\">include:   - project: 'my-group\/my-project'     ref: v1.0.0     file: '\/templates\/.gitlab-ci-template.yml'  variables:     ENABLE_LINT: \"true\"     ENABLE_BUILD: \"true\"     ENABLE_DEPLOY_PROD: \"false\"     ENABLE_DEPLOY_TEST: \"true\"     ENABLE_DEPLOY_DEV: \"true\" <\/code><\/pre>\n<p><strong>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 2. <\/strong>\u0415\u0441\u043b\u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f:<\/p>\n<pre><code class=\"yaml\">include:   - project: '$CI_PROJECT_PATH'     ref: '$CI_PROJECT_REF'     file: '$CI_PROJECT_FILE'  variables:     ENABLE_LINT: \"true\"     ENABLE_BUILD: \"true\"     ENABLE_DEPLOY_PROD: \"false\"     ENABLE_DEPLOY_TEST: \"true\"     ENABLE_DEPLOY_DEV: \"true\" <\/code><\/pre>\n<p>\u0423 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442.<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0433\u0438\u0431\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c CI\/CD \u0431\u0435\u0437 \u0437\u0430\u044f\u0432\u043a\u0438 \u043d\u0430 \u0443\u043b\u044c\u0442\u0438\u043c\u0430\u0442\u0438\u0437\u043c. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043a\u043e\u043c\u0431\u0438\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u0431\u043b\u043e\u043d\u044b(templates) \u043b\u044e\u0431\u044b\u043c \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0434\u043b\u044f \u0432\u0430\u0441 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043e\u0434\u0438\u043d \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u2013 <a href=\"https:\/\/gitlab.com\/gitlab-org\/gitlab-foss\/-\/tree\/master\/lib\/gitlab\/ci\/templates\"><u>\u044d\u0442\u043e \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0441\u0430\u043c\u043e\u0433\u043e gitlab<\/u><\/a>. \u041c\u043d\u0435 \u0436\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0442\u044c \u0432\u043e\u043f\u0440\u043e\u0441 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0442\u0430\u043a\u043e\u0439 \u043f\u043e\u0434\u0445\u043e\u0434. \u0411\u0443\u0434\u0443 \u0440\u0430\u0434 \u0412\u0430\u0448\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c \u0438 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u043c.<\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p> <!----> <!----><\/div>\n<p> <!----> <!----><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\/ru\/companies\/ru_mts\/articles\/747978\/\"> https:\/\/habr.com\/ru\/companies\/ru_mts\/articles\/747978\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442, \u043c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041f\u0430\u043d\u043e\u0432 \u041c\u0438\u0445\u0430\u0438\u043b, \u044f <a href=\"https:\/\/career.habr.com\/companies\/mts\/vacancies\">DevOps\u2011\u0438\u043d\u0436\u0435\u043d\u0435\u0440<\/a> \u041c\u0422\u0421 Digital. \u0425\u043e\u0447\u0443 \u043f\u043e\u0434\u0435\u043b\u0438\u0442\u044c\u0441\u044f \u0441 \u0432\u0430\u043c\u0438 \u043e\u043f\u044b\u0442\u043e\u043c \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u00ab\u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0445\u00bb pipelines \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 gitlab-ci. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0439 CI\/CD, \u0438\u0437 \u0447\u0435\u0433\u043e \u043e\u043d \u0441\u043e\u0441\u0442\u043e\u0438\u0442, \u0434\u043b\u044f \u0447\u0435\u0433\u043e \u043d\u0443\u0436\u0435\u043d \u0438 \u043a\u0430\u043a \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c, \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u044e\u0449\u0438\u043c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u043d\u0435\u0442\u0438\u043f\u043e\u0432\u044b\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432.<\/p>\n<figure class=\"full-width\"><\/figure>\n<h3>\u0427\u0430\u0441\u0442\u044c 1: \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u043b\u0430\u0441c\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e gitlab-ci<\/h3>\n<p>\u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u0432\u044b \u0443\u0447\u0430\u0441\u0442\u043d\u0438\u043a \u043a\u043e\u043c\u0430\u043d\u0434\u044b, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043f\u0440\u043e\u0432\u043e\u0436\u0434\u0430\u0435\u0442 \u043a\u0440\u0443\u043f\u043d\u044b\u0439 \u0441\u0442\u0440\u0438\u043c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043c\u0430\u043d\u0434 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438:<\/p>\n<ul>\n<li>\n<p>Frontend;<\/p>\n<\/li>\n<li>\n<p>Backend;<\/p>\n<\/li>\n<li>\n<p>API.\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>\u041e\u0434\u043d\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 Golang, \u0434\u0440\u0443\u0433\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u2013 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 Gradle, \u0430 \u0435\u0449\u0435 Frontend \u0435\u0441\u0442\u044c. \u041d\u0443\u0436\u043d\u043e \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c \u0438 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435\u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0434\u043b\u044f AWX \u0438\u043b\u0438 Terraform.<\/p>\n<p>\u0412 \u0442\u0430\u043a\u0438\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441: \u00ab\u0410 \u043a\u0430\u043a\u00a0\u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435 \u044d\u0442\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c?\u00bb. \u0412\u0430\u0440\u0438\u0430\u043d\u0442\u044b \u0442\u0430\u043a\u0438\u0435:<\/p>\n<ul>\n<li>\n<p>\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0442\u0438\u043f\u043e\u0432\u044b\u0435 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 gitlab-ci.yml \u0438 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u0438\u0445 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438. \u041d\u043e \u0442\u0443\u0442 \u043c\u044b \u0441\u0442\u043e\u043b\u043a\u043d\u0435\u043c\u0441\u044f \u0441 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u044f;<\/p>\n<\/li>\n<li>\n<p>\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0434\u0438\u043d \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0438 \u043f\u0435\u0440\u0435\u043b\u043e\u0436\u0438\u0442\u044c \u0432\u0441\u0435 \u0442\u0443\u0434\u0430, \u0437\u0430\u0442\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e include \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0432 \u043d\u0443\u0436\u043d\u044b\u0439 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439. \u041d\u043e \u0438 \u0442\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442 \u0442\u0440\u0443\u0434\u043d\u043e\u0441\u0442\u0438. \u0424\u0430\u0439\u043b\u044b \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 (test, build, deploy, etc).<\/p>\n<\/li>\n<\/ul>\n<p>\u0425\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u043d\u0430\u0441\u0442\u043e\u043b\u044c\u043a\u043e \u0433\u0438\u0431\u043a\u043e\u0435 \u0438 \u0431\u044b\u0441\u0442\u0440\u043e\u0435, \u0447\u0442\u043e-\u0442\u043e, \u0447\u0442\u043e \u0434\u0430\u0441\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u0442\u044c \u0432\u0440\u0435\u043c\u044f \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0432 \u043d\u0430\u0448\u0438 pipelines.<\/p>\n<p>\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c.<\/p>\n<h3>\u0427\u0430\u0441\u0442\u044c 2: \u0422\u0438\u043f\u043e\u0432\u044b\u0435 gitlab-ci \u2013 \u0447\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043b\u0443\u0447\u0448\u0435?<\/h3>\n<p>\u0422\u0438\u043f\u043e\u0432\u043e\u0439 gitlab-ci.yml, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u0430\u043c\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e stage \u0438 job. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"yaml\">#\u041f\u0440\u0438\u043c\u0435\u0440 1 stages:     - test     - build     - deploy  test:job:     stage: test     image:         name: $IMAGE         entrypoint: []     script:         - echo \"test\"     rules:         if: $CI_COMMIT_BRANCH == \"master\"     varuables:         ENABLE: \"true\"     tags:         - prod-runner  build:job:     stage: build     image:         name: $IMAGE         entrypoint: []     dependencies: []     needs:         - test-job     script:         - echo \"build\"     rules:         if: $CI_COMMIT_BRANCH == \"master\"     varuables:         ENABLE: \"true\"     tags:         - prod-runner  deploy:job:     stage: deploy     image:         name: $IMAGE         entrypoint: []     dependencies:         - build-job     needs:         - test-job         - build-job     script:         - echo \"deploy\"     rules:         if: $CI_COMMIT_BRANCH == \"master\"     varuables:         ENABLE: \"true\"     tags:         - prod-runner <\/code><\/pre>\n<p>\u0412 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043a\u0430\u0436\u0434\u0430\u044f job \u043d\u0435\u0441\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043a\u043e\u0434\u043e\u043c. \u042d\u0442\u043e \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043d\u043e \u0441 \u043a\u0430\u0436\u0434\u043e\u0439 \u043d\u043e\u0432\u043e\u0439 \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 \u043a\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c\u0441\u044f \u00ab\u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u00bb \u0444\u0430\u0439\u043b\u0430.<\/p>\n<h4>\u041f\u0443\u043d\u043a\u0442 2.1: \u0422\u0435\u043e\u0440\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u0434\u043e\u0441\u0442\u0438\u0447\u044c \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438 \u0438 \u0447\u0438\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0430, \u0440\u0430\u0437\u043e\u0431\u044c\u0435\u043c \u041f\u0440\u0438\u043c\u0435\u0440 1 \u043d\u0430 \u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0447\u0430\u0441\u0442\u0438.\u00a0<\/p>\n<p>Gitlab \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e: <\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/yaml\/#include\">include<\/a> \u2013 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u0434\u0440\u0443\u0433\u043e\u0439;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/yaml\/#extends\">extends<\/a> \u2013 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0441\u0445\u043e\u0436\u0438\u0445 \u0431\u043b\u043e\u043a\u043e\u0432 \u043a\u043e\u0434\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439 \u0438\u043b\u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u043b\u043e\u043a\u0430 \u043a\u043e\u0434\u0430 \u0437\u0430 \u0441\u0447\u0435\u0442 \u0434\u0440\u0443\u0433\u043e\u0433\u043e;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/yaml\/yaml_optimization.html#anchors\">anchors<\/a> \u2013 \u044f\u043a\u043e\u0440\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0431\u043b\u043e\u043a\u0438 \u043a\u043e\u0434\u0430 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u0445;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/yaml\/yaml_optimization.html#reference-tags\">reference tags<\/a> \u2013 \u0441\u0441\u044b\u043b\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0434\u0430\u044e\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0441\u043b\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0431\u043b\u043e\u043a \u043a\u043e\u0434\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043a\u043e\u0434.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u044b (pipelines) \u043a\u0430\u043a \u00ab\u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u00bb.<\/p>\n<h4>\u041f\u0443\u043d\u043a\u0442 2.2: \u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0438 \u0442\u0435\u043e\u0440\u0438\u044f<\/h4>\n<p>\u0412\u0437\u0433\u043b\u044f\u043d\u0443\u0432 \u0435\u0449\u0435 \u0440\u0430\u0437 \u043d\u0430 \u041f\u0440\u0438\u043c\u0435\u0440 1, \u0432\u044b\u0434\u0435\u043b\u0438\u043c \u0447\u0430\u0441\u0442\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u044e\u0442 \u043c\u043d\u043e\u0433\u043e \u043c\u0435\u0441\u0442\u0430 \u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<ul>\n<li>\n<p>\u0431\u043b\u043e\u043a \u043f\u0440\u0430\u0432\u0438\u043b (rules);<\/p>\n<\/li>\n<li>\n<p>\u0431\u043b\u043e\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 (variables);<\/p>\n<\/li>\n<li>\n<p>\u0431\u043b\u043e\u043a \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432(before_script, script, after_script)\u00a0<\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b\u043d\u0435\u0441\u0435\u043c \u044d\u0442\u0438 \u0431\u043b\u043e\u043a\u0438 \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430:<\/p>\n<pre><code class=\"bash\">templates-repo\/ |--variables |   |--test-vars |   |  \u2514\u2500\u2500test-vars.gitlab-ci.yml |   |--build-vars |   |  \u2514\u2500\u2500build-vars.gitlab-ci.yml |   \u2514\u2500\u2500deploy-vars |      \u2514\u2500\u2500deploy-vars.gitlab-ci.yml |--rules |   |--test-rules |   |  \u2514\u2500\u2500test-rules.gitlab-ci.yml |   |--build-rules |   |  \u2514\u2500\u2500build-rules.gitlab-ci.yml |   \u2514\u2500\u2500deploy-rules |      \u2514\u2500\u2500deploy-rules.gitlab-ci.yml |--scripts |   |--test-scripts |   |  \u2514\u2500\u2500test-scripts.gitlab-ci.yml |   |--build-scripts |   |  \u2514\u2500\u2500build-scripts.gitlab-ci.yml |   \u2514\u2500\u2500deploy-scripts |      \u2514\u2500\u2500deploy-scripts.gitlab-ci.yml |--templates |   |--build-bin |   |  \u2514\u2500\u2500build-bin-template.gitlab-ci.yml |   |--build-image |   |  \u2514\u2500\u2500build-image-template.gitlab-ci.yml |   \u2514\u2500\u2500deploy |      \u2514\u2500\u2500deploy-template.gitlab-ci.yml |--entrypoints |   |--java |   |  |--mvn.gitlab-ci.yml |   |  \u2514\u2500\u2500gradle.gitlab-ci.yml |   |--golang |   |  \u2514\u2500\u2500golang.gitlab-ci.yml |   \u2514\u2500\u2500deploy |      \u2514\u2500\u2500deploy-template.gitlab-ci.yml<\/code><\/pre>\n<p>\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430, \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u0443\u044e job. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0441\u043e\u0431\u0435\u0440\u0435\u043c job kaniko, \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 jobs \u0431\u0443\u0434\u0443\u0442 \u0441\u043e\u0431\u0438\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0442\u0430\u043a\u043e\u043c\u0443 \u0436\u0435 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0443.<\/p>\n<h4>\u041f\u0443\u043d\u043a\u0442 2.3: \u041f\u0440\u0438\u043c\u0435\u0440\u044b<\/h4>\n<p>\u0427\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u0443\u044e job, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0432\u044b\u043d\u0435\u0441\u0435\u043d\u043d\u044b\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439. \u041d\u0438\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u043c\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432:<\/p>\n<p>build-rules.gitlab-ci.yml<\/p>\n<pre><code class=\"yaml\">############# ## Changes ## #############  .changes-exclude-files-devops: &amp;changes-exclude-files-devops   - \".gitlab-ci.yml\"   - \"Dockerfile\"  ########### ## Rules ## ###########  .if-enable-build-kaniko-env: &amp;if-enable-build-kaniko-env   if: $ENABLE_KANIKO_BUILD == \"false\"  .if-enable-build-kaniko-tag-env: &amp;if-enable-build-kaniko-tag-env   if: $ENABLE_KANIKO_BUILD_TAG == \"false\"  .if-ci-branch-and-env-exist: &amp;if-ci-branch-and-env-exist   if: $CI_COMMIT_BRANCH =~ \/master|feature\\\/.*\/ &amp;&amp; $ENABLE_KANIKO_BUILD == \"true\"  .if-ci-tag-and-env-exist: &amp;if-ci-tag-and-env-exist   if: $CI_COMMIT_TAG =~ \/^(v[0-9]\\d*)\\.([0-9]\\d*)\\.([0-9]\\d*)(-([a-zA-Z-]*))?\/ &amp;&amp; $ENABLE_KANIKO_BUILD_TAG == \"true\"  .if-piplince-surce-push-or-merge-request: &amp;if-piplince-surce-push-or-merge-request   if: $CI_PIPELINE_SOURCE == \"push\" || $CI_PIPELINE_SOURCE == \"merge_request_event\"  .if-ci-commit-tag: &amp;if-ci-commit-tag   if: $CI_COMMIT_TAG  ################# ## Build rules ## #################  .rules:build-image:job:   rules:     - &lt;&lt;: *if-enable-build-kaniko-env       when: never     - &lt;&lt;: *if-piplince-surce-push-or-merge-request       changes: *changes-exclude-files-devops       when: never     - &lt;&lt;: *if-ci-commit-tag       when: never     - &lt;&lt;: *if-ci-branch-and-env-exist     - when: never <\/code><\/pre>\n<p>build-vars.gitlab-ci.yml<\/p>\n<pre><code class=\"yaml\">.variables:k8s:deploy:kaniko:   variables:     ENVIRONMENT: prod     IMAGE: kaniko:latest <\/code><\/pre>\n<p>build-scripts.gitlab-ci.yml<\/p>\n<pre><code class=\"yaml\">.script:infra-build-script:   script:     - 'echo \"Building docker image: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA\"'     - \/kaniko\/executor         --context \"$CI_PROJECT_DIR\"         --dockerfile \"$CI_PROJECT_DIR\/.docker\/Dockerfile\"         --destination \"$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG-$CI_COMMIT_SHORT_SHA\"         --cache=true --cache-ttl 336h         --label ru.mts.git.project=\"$CI_PROJECT_URL\"         --label ru.mts.git.ref=\"$CI_COMMIT_REF_NAME\"         --label ru.mts.git.revision=\"$CI_COMMIT_SHORT_SHA\"         --skip-tls-verify         --use-new-run         --registry-mirror=your.registry.com         --build-arg http_proxy=$http_proxy         --build-arg https_proxy=$https_proxy         --build-arg no_proxy=$no_proxy <\/code><\/pre>\n<p>\u0424\u0430\u0439\u043b \/templates\/build-image\/build-image-template.gitlab-ci.yml \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"yaml\">include:     - local: '\/scripts\/build-scripts\/build-scripts.gitlab-ci.yml'     - local: '\/rules\/build-rules\/build-rules.gitlab-ci.yml'     - local: '\/variables\/build-vars\/build-vars.gitlab-ci.yml'  build:kaniko:job:     stage: build-image     image:         name: $IMAGE         entrypoint: []     needs:         - job: test-job     dependencies: []     extends:         - .script:infra-build-script         - .rules:build-image:job         - .variables:k8s:deploy:kaniko     tags:         - prod-runner <\/code><\/pre>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e extends \u043c\u044b \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u043b\u0438 \u0432 \u0448\u0430\u0431\u043b\u043e\u043d scripts, rules \u0438 variables. \u042d\u0442\u043e \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u0439 job.<\/p>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0432\u044b\u0448\u0435 (\u041f\u0443\u043d\u043a\u0442 2.2 &#8212; \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430), \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0435\u0449\u0435 \u043e\u0434\u043d\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f entrypoints\/, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u044f\u0435\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b (templates) \u0434\u043b\u044f \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>\u041e\u043d \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"yaml\">include:     - local: '\/templates\/build-bin\/build-bin-template.gitlab-ci.yml'     - local: '\/templates\/build-image\/build-image-template.gitlab-ci.yml'     - local: '\/templates\/deploy\/deploy-template.gitlab-ci.yml'  stages:     - test     - build     - deploy  # Global variables variables:     ENABLE_LINT: \"true\"     ENABLE_BUILD: \"true\"     ENABLE_DEPLOY_PROD: \"true\"     ENABLE_DEPLOY_TEST: \"true\"     ENABLE_DEPLOY_DEV: \"true\" <\/code><\/pre>\n<p>\u0422\u0443\u0442 \u043c\u044b \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u044f\u0435\u043c stages, includes, variables. \u0422\u043e \u0435\u0441\u0442\u044c \u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u00ab\u0432\u0435\u0440\u0445\u043d\u0435\u0443\u0440\u043e\u0432\u043d\u0435\u0432\u043e\u043c\u00bb \u0438\u043b\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u043e\u043c \u0444\u0430\u0439\u043b\u0435.<\/p>\n<h4>\u041f\u0443\u043d\u043a\u0442 2.4: \u041d\u044e\u0430\u043d\u0441\u044b<\/h4>\n<p>\u041f\u0440\u043e\u0439\u0434\u0435\u043c\u0441\u044f \u043f\u043e \u043d\u044e\u0430\u043d\u0441\u0430\u043c \u044d\u0442\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438. \u0422\u0430\u043a \u043a\u0430\u043a Gitlab \u0443 \u0432\u0441\u0435\u0445 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0439 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0432\u043b\u0430\u0434\u0435\u043d\u0438\u044f \u2014 \u00ab\u043a\u043e\u043c\u043c\u0443\u043d\u0430\u043b\u044c\u043d\u044b\u0439\u00bb \u0438\u043b\u0438\u00a0\u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u0434\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u044b\u0439 \u0438 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439, \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044f\u0442\u044c\u0441\u044f \u0432\u00a0\u0447\u0430\u0441\u0442\u0438 include. <a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/yaml\/#include\">\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u044f<\/a> \u0433\u043e\u0432\u043e\u0440\u0438\u0442, \u0447\u0442\u043e\u00a0\u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0447\u0435\u0442\u044b\u0440\u044c\u043c\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u00ab\u0438\u043d\u043f\u0443\u0442\u0430\u043c\u0438\u00bb:<\/p>\n<p><strong>Possible inputs: The include subkeys.\u00a0<\/strong><\/p>\n<p><strong>include:local<\/strong> \u2013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0445\u0441\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e;<\/p>\n<p><strong>include:project<\/strong> \u2013 \u0432\u0430\u0440\u0438\u0430\u043d\u0442, \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0435 \u0441\u043b\u0443\u0447\u0430\u0435\u0432, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0442\u043e\u043d\u043a\u043e \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0444\u0430\u0439\u043b\u0430 \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f;\u00a0<\/p>\n<p><strong>include:remote<\/strong> \u2013 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0438\u0437 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u043e\u0432, \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f (\u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438);<\/p>\n<p><strong>include:template<\/strong> \u2013 \u043e\u0442\u043c\u0435\u0442\u0430\u0435\u043c, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0445 \u0448\u0430\u0431\u043b\u043e\u043d\u043e\u0432 \u0441\u0430\u043c\u043e\u0433\u043e gitlab.<\/p>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0431\u044b \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432:\u00a0<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0443\u00a0\u0432\u0430\u0441 \u043e\u0442\u043a\u0440\u044b\u0442 \u0438 \u0432\u0441\u0435 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432\u00a0main (master) \u0432\u0435\u0442\u043a\u0435\u00a0\u2014 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f include:remote, \u0442\u0430\u043a \u043a\u0430\u043a\u00a0\u044d\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430\u00a0\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0438 \u043e\u043d\u0430 \u0437\u0430\u0439\u043c\u0435\u0442 \u043c\u0435\u043d\u044c\u0448\u0435 \u043c\u0435\u0441\u0442\u0430 (\u0445\u043e\u0442\u044f, \u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c\u00a0\u0431\u044b, \u043a\u0443\u0434\u0430 \u0435\u0449\u0435 \u043c\u0435\u043d\u044c\u0448\u0435?). \u0415\u0441\u043b\u0438 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0437\u0430\u043a\u0440\u044b\u0442\u044b\u0439(internal)\u00a0\u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 include:project.<\/p>\n<p>Include:project \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0432\u0443\u043c\u044f \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u0430\u043c\u0438 \u0432 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u0443\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u043c\u0438 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u0432 \u0441\u0432\u043e\u0438\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u0445.<\/p>\n<p><strong>\u0412\u0430\u0440\u0438\u0430\u043d\u0442 1.<\/strong> \u0415\u0441\u043b\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e ansible, terraform, etc\u00a0\u2014 \u0444\u0430\u0439\u043b \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u0432\u0438\u0434\u0430, \u0441 \u044f\u0432\u043d\u044b\u043c \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043f\u043e\u043b\u0435\u0439:<\/p>\n<pre><code class=\"yaml\">include:   - project: 'my-group\/my-project'     ref: v1.0.0     file:<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-350289","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/350289","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=350289"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/350289\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=350289"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=350289"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=350289"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}