{"id":299834,"date":"2020-03-07T21:00:13","date_gmt":"2020-03-07T21:00:13","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=299834"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2020-03-07T21:00:13","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=299834","title":{"rendered":"\u041a\u0430\u043a Gitlab-CI \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f?"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/491490\/\">\n<h2 id=\"peremennye-v-gitlab-mozhno-zadat-v-neskolkih-mestah\">\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 Gitlab \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445:<\/h2>\n<p>  <\/p>\n<ol>\n<li>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0433\u0440\u0443\u043f\u043f<\/li>\n<li>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/li>\n<li>\u0412\u043d\u0443\u0442\u0440\u0438 .gitlab-ci.yml<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0433\u0440\u0443\u043f\u043f \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u0430\u043a &quot;\u0444\u0430\u0439\u043b&quot;\u0438\u043b\u0438 &quot;\u043e\u0431\u044b\u0447\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e&quot; \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0433\u0430\u043b\u043e\u0447\u043a\u0438 &quot;\u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043e&quot; \u0438 &quot;\u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c&quot;.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/iu\/2f\/d2\/iu2fd2ums7tmrkyqb4hrbhuenzg.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p><em>\u0421 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0446\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.<\/em><\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<h2 id=\"nasledovanie-s-gruppami-supishodnikisuphttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesabproject-8\">\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 <a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/a\/b\/project-8\"><sup>[\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438]<\/sup><\/a><\/h2>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438\u0437 \u0433\u0440\u0443\u043f\u043f \u043d\u0430\u0441\u043b\u0435\u0434\u0443\u044e\u0442\u0441\u044f, \u0441 \u0442\u0435\u043c \u043f\u0440\u0430\u0432\u0438\u043b\u043e\u043c, \u0447\u0442\u043e \u0447\u0435\u043c \u0431\u043b\u0438\u0436\u0435 \u0433\u0440\u0443\u043f\u043f\u0430 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0430 \u043a \u043f\u0440\u043e\u0435\u043a\u0442\u0443 \u0442\u0435\u043c \u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u0430\u0436\u043d\u0435\u0435.<\/p>\n<p>  <\/p>\n<h3 id=\"gruppy-s-peremennymi\">\u0413\u0440\u0443\u043f\u043f\u044b \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438<\/h3>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/4b\/wl\/qj\/4bwlqj-g_cztown5ks5znmiqgl8.png\" alt=\"\u0413\u0440\u0443\u043f\u043f\u044b \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"gitlab-ciymlhttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesabproject-8-blobmastergitlab-ciyml\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/a\/b\/project-8\/-\/blob\/master\/.gitlab-ci.yml\">.gitlab-ci.yml<\/a><\/h3>\n<p>  <\/p>\n<pre><code class=\"plaintext\">image: busybox:latest variables:   GIT_STRATEGY: none  echo:   stage: test   script:     - echo $MSG<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"rezultat-paylaynahttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesabproject-8-jobs460514261\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/a\/b\/project-8\/-\/jobs\/460514261\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0430\u0439\u043b\u0430\u0439\u043d\u0430<\/a><\/h3>\n<p>  <\/p>\n<pre><code class=\"bash\">$ echo $MSG B<\/code><\/pre>\n<p>  <\/p>\n<p>\u0415\u0441\u043b\u0438 \u0431\u044b \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u0431\u044b\u043b\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0432 \u0433\u0440\u0443\u043f\u043f\u0435 B, \u0442\u043e \u043c\u044b \u0431\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0410.<\/p>\n<p>  <\/p>\n<hr\/>\n<p>  <\/p>\n<h2 id=\"nasledovanie-peremennyh-vnutri-gitlab-ciyml-supishodnikisuphttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesdproject-4\">\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 .gitlab-ci.yml <a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/d\/project-4\"><sup>[\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438]<\/sup><\/a><\/h2>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u0432\u0441\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0441\u0442\u043e: \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0436\u043e\u0431\u044b.<\/p>\n<p>  <\/p>\n<h3 id=\"gruppy-c-peremennymi\">\u0413\u0440\u0443\u043f\u043f\u044b c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438<\/h3>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ze\/em\/ih\/zeemihn1rerz65eb_hgmejkx0iw.png\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"gitlab-ciymlhttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesabproject-8-blobmastergitlab-ciyml-1\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/a\/b\/project-8\/-\/blob\/master\/.gitlab-ci.yml\">.gitlab-ci.yml<\/a><\/h3>\n<p>  <\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0442\u0435\u043f\u0435\u0440\u044c 2 \u0434\u0436\u043e\u0431\u044b, \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043d\u0438\u0445 \u044f\u0432\u043d\u043e \u0443\u043a\u0430\u0436\u0435\u043c $MSG. <\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">image: busybox:latest variables:   GIT_STRATEGY: none   MSG: &quot;Custom in global .gitlab-ci.yml&quot;  echo:   stage: test   script:     - echo $MSG  echo with var:   stage: test   variables:     MSG: &quot;Custom in job .gitlab-ci.yml&quot;   script:     - echo $MSG<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"rezultat-paylaynahttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesdproject-4pipelines123507496\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/d\/project-4\/pipelines\/123507496\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0430\u0439\u043b\u0430\u0439\u043d\u0430<\/a><\/h3>\n<p>  <\/p>\n<ul>\n<li>\n<p>echo:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ echo $MSG Custom in global .gitlab-ci.yml Job succeeded<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>echo with vars:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ echo $MSG Custom in job .gitlab-ci.yml Job succeeded<\/code><\/pre>\n<p>  <\/p>\n<hr\/>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"nasledovanie-s-gruppami-i-vnutri-gitlab-ciyml-supishodnikisuphttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variableszyproject-1\">\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 \u0438 \u0432\u043d\u0443\u0442\u0440\u0438 .gitlab-ci.yml <a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/z\/y\/project-1\"><sup>[\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438]<\/sup><\/a><\/h2>\n<p>  <\/p>\n<p>\u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0435 2 \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f \u0432 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0435 \u043f\u0435\u0440\u0435\u0434 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u043d\u0443\u0442\u0440\u0438 .gitlab-ci.yml.<\/p>\n<p>  <\/p>\n<h3 id=\"gruppy-c-peremennymi-1\">\u0413\u0440\u0443\u043f\u043f\u044b c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438<\/h3>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/wv\/ke\/3o\/wvke3o9zni565rug1kegmkorxha.png\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"gitlab-ciymlhttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesabproject-8-blobmastergitlab-ciyml-2\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/a\/b\/project-8\/-\/blob\/master\/.gitlab-ci.yml\">.gitlab-ci.yml<\/a><\/h3>\n<p>  <\/p>\n<pre><code class=\"plaintext\">image: busybox:latest variables:   GIT_STRATEGY: none   MSG: &quot;Custom in global .gitlab-ci.yml&quot;  echo:   stage: test   script:     - echo $MSG  echo with var:   stage: test   variables:     MSG: &quot;Custom in job .gitlab-ci.yml&quot;   script:     - echo $MSG<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"rezultat-paylaynahttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variableszyproject-1pipelines123486449\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/z\/y\/project-1\/pipelines\/123486449\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0430\u0439\u043b\u0430\u0439\u043d\u0430<\/a><\/h3>\n<p>  <\/p>\n<ul>\n<li>\n<p>echo:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ echo $MSG Y Job succeeded<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>echo with vars:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ echo $MSG Y Job succeeded<\/code><\/pre>\n<p>  <\/p>\n<hr\/>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"nasledovanie-s-ukazaniem-peremennyh-v-nastroykah-proekta-supishodnikisuphttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variableszyproject-3\">\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 <a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/z\/y\/project-3\"><sup>[\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438]<\/sup><\/a><\/h2>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u043c\u0435\u044e\u0442 \u0412\u0421\u0415\u0413\u0414\u0410 \u043d\u0430\u0438\u0432\u044b\u0441\u0448\u0438\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442! \u0418 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 .gitlab-ci.yml \u043d\u0435 \u0438\u0433\u0440\u0430\u044e\u0442 \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u0440\u043e\u043b\u0438. <\/p>\n<p>  <\/p>\n<h3 id=\"gruppy-c-peremennymi-2\">\u0413\u0440\u0443\u043f\u043f\u044b c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438<\/h3>\n<p>  <\/p>\n<p>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0433\u0440\u0443\u043f\u043f \u0438\u043c\u0435\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442.<br \/>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/by\/ni\/zb\/bynizbno7obalix_sxmgiz0dggm.png\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"gitlab-ciymlhttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesabproject-8-blobmastergitlab-ciyml-3\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/a\/b\/project-8\/-\/blob\/master\/.gitlab-ci.yml\">.gitlab-ci.yml<\/a><\/h3>\n<p>  <\/p>\n<p>\u0412\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0444\u0430\u0439\u043b\u043e\u043c \u0438\u0437 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u0430. \u0417\u0434\u0435\u0441\u044c \u043e\u043f\u044f\u0442\u044c \u0435\u0441\u0442\u044c, \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 .gitlab-ci.yml, \u043d\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0433\u0440\u0443\u043f\u043f \u0432\u0441\u0435 \u0440\u0430\u0432\u043d\u043e \u0438\u043c\u0435\u044e\u0442 \u043f\u0435\u0440\u0435\u0434 \u043d\u0438\u043c\u0438 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">image: busybox:latest variables:   GIT_STRATEGY: none   MSG: &quot;Custom in global .gitlab-ci.yml&quot;  echo:   stage: test   script:     - echo $MSG  echo with var:   stage: test   variables:     MSG: &quot;Custom in job .gitlab-ci.yml&quot;   script:     - echo $MSG<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"rezultat-paylaynahttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variableszyproject-3pipelines123583808\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/z\/y\/project-3\/pipelines\/123583808\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0430\u0439\u043b\u0430\u0439\u043d\u0430<\/a><\/h3>\n<p>  <\/p>\n<ul>\n<li>\n<p>echo:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ echo $MSG project-3 Job succeeded<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>echo with vars:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ echo $MSG project-3 Job succeeded<\/code><\/pre>\n<p>  <\/p>\n<hr\/>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"nasledovanie-s-pustym-znacheniem--supishodnikisuphttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variableszyproject-5\">\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043f\u0443\u0441\u0442\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c <a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/z\/y\/project-5\"><sup>[\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438]<\/sup><\/a><\/h2>\n<p>  <\/p>\n<p>\u041f\u0443\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2013 \u044d\u0442\u043e \u0442\u043e\u0436\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<br \/>  \u041f\u0443\u0441\u0442\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u2013 \u044d\u0442\u043e \u043d\u0435 Null<\/p>\n<p>  <\/p>\n<h3 id=\"gruppy-c-peremennymi-3\">\u0413\u0440\u0443\u043f\u043f\u044b c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438<\/h3>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/vs\/mv\/gq\/vsmvgqrc4q9eh_zpevibj3tqa8u.png\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"gitlab-ciymlhttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesabproject-8-blobmastergitlab-ciyml-4\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/a\/b\/project-8\/-\/blob\/master\/.gitlab-ci.yml\">.gitlab-ci.yml<\/a><\/h3>\n<p>  <\/p>\n<pre><code class=\"plaintext\">image: busybox:latest variables:   GIT_STRATEGY: none   MSG: &quot;Custom in global .gitlab-ci.yml&quot;  echo:   stage: test   script:     - echo $MSG  echo with var:   stage: test   variables:     MSG: &quot;Custom in job .gitlab-ci.yml&quot;   script:     - echo $MSG<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"rezultat-paylaynahttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variableszyproject-5pipelines123503127\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/z\/y\/project-5\/pipelines\/123503127\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0430\u0439\u043b\u0430\u0439\u043d\u0430<\/a><\/h3>\n<p>  <\/p>\n<ul>\n<li>\n<p>echo:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ echo $MSG Job succeeded<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>echo with vars:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ echo $MSG Job succeeded<\/code><\/pre>\n<p>  <\/p>\n<hr\/>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"nasledovanie-s-inklyudom-i-gruppami--supishodnikisuphttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variableszyproject-5\">\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0438\u043d\u043a\u043b\u044e\u0434\u043e\u043c \u0438 \u0433\u0440\u0443\u043f\u043f\u0430\u043c\u0438 <a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/z\/y\/project-5\"><sup>[\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438]<\/sup><\/a><\/h2>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432 project-2 \u0437\u0430\u0438\u043d\u043a\u043b\u044e\u0434\u0438\u0442\u044c project-3<br \/>  \u0413\u0440\u0443\u043f\u043f\u044b \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u043c\u0435\u044e\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442.<\/p>\n<p>  <\/p>\n<h3 id=\"gruppy-c-peremennymi-4\">\u0413\u0440\u0443\u043f\u043f\u044b c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438<\/h3>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/lc\/vg\/19\/lcvg19w1dkgdqlkennmeta1awcu.png\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"gitlab-ciymlhttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesdproject-6-blobmastergitlab-ciyml\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/d\/project-6\/-\/blob\/master\/.gitlab-ci.yml\">.gitlab-ci.yml<\/a><\/h3>\n<p>  <\/p>\n<p>\u0418 \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e \u0432 .gitlab-ci.yml<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">variables:  MSG: &quot;With  include  .gitlab-ci.yml&quot; include:  - project: how-is-gitlab-ci-inherit-environment-variables\/z\/y\/project-3    file: '.gitlab-ci.yml'<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"rezultat-paylaynahttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesabproject-2pipelines123509948\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/a\/b\/project-2\/pipelines\/123509948\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0430\u0439\u043b\u0430\u0439\u043d\u0430<\/a><\/h3>\n<p>  <\/p>\n<ul>\n<li>\n<p>echo:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ echo $MSG B Job succeeded<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>echo with vars:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ echo $MSG B Job succeeded<\/code><\/pre>\n<p>  <\/p>\n<hr\/>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<h2 id=\"nasledovanie-s-inklyudom---supishodnikisuphttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesdproject-6\">\u041d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0438\u043d\u043a\u043b\u044e\u0434\u043e\u043c <a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/d\/project-6\"><sup>[\u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438]<\/sup><\/a><\/h2>\n<p>  <\/p>\n<p>\u0417\u0434\u0435\u0441\u044c \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0432 project-2 \u0437\u0430\u0438\u043d\u043a\u043b\u044e\u0434\u0438\u0442\u044c project-3.<br \/>  C \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u0447\u0442\u043e: \u043d\u0438 \u0433\u0440\u0443\u043f\u043f\u044b, \u043d\u0438 \u0441\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442 \u043d\u0435 \u0438\u043c\u0435\u044e\u0442 \u043d\u0438\u043a\u0430\u043a\u0438\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445.<\/p>\n<p>  <\/p>\n<h3 id=\"gruppy-c-peremennymi-5\">\u0413\u0440\u0443\u043f\u043f\u044b c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438<\/h3>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/mp\/bv\/e1\/mpbve1krliedbl7j3wb3md2ecjk.png\"\/><\/p>\n<p>  <\/p>\n<h3 id=\"gitlab-ciymlhttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesdproject-6-blobmastergitlab-ciyml-1\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/d\/project-6\/-\/blob\/master\/.gitlab-ci.yml\">.gitlab-ci.yml<\/a><\/h3>\n<p>  <\/p>\n<p>\u0422\u0430\u043a\u043e\u0439 \u0436\u0435 \u043a\u0430\u043a \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">variables:  MSG: &quot;With  include  .gitlab-ci.yml&quot; include:  - project: how-is-gitlab-ci-inherit-environment-variables\/z\/y\/project-3    file: '.gitlab-ci.yml'<\/code><\/pre>\n<p>  <\/p>\n<h3 id=\"rezultat-paylaynahttpsgitlabcomhow-is-gitlab-ci-inherit-environment-variablesdproject-6pipelines123509858\"><a href=\"https:\/\/gitlab.com\/how-is-gitlab-ci-inherit-environment-variables\/d\/project-6\/pipelines\/123509858\">\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0430\u0439\u043b\u0430\u0439\u043d\u0430<\/a><\/h3>\n<p>  <\/p>\n<ul>\n<li>\n<p>echo:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ echo $MSG With include .gitlab-ci.yml Job succeeded<\/code><\/pre>\n<p>  <\/li>\n<li>\n<p>echo with vars:<\/p>\n<p>  <\/p>\n<pre><code class=\"bash\">$ echo $MSG Custom in job .gitlab-ci.yml Job succeeded<\/code><\/pre>\n<p>  <\/li>\n<\/ul>\n<p>  <\/p>\n<h1 id=\"poluchayutsya-sleduyuschie-prioritety\">\u041f\u043e\u043b\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u044b:<\/h1>\n<p>  <\/p>\n<ol>\n<li>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/li>\n<li>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u0433\u0440\u0443\u043f\u043f\u0430\u0445<\/li>\n<li>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u0433\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0434\u0436\u043e\u0431\u044b (\u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0438 \u0437\u0430\u0438\u043d\u043a\u043b\u044e\u0434\u0435\u043d\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b)<\/li>\n<li>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 .gitlab-ci.yml<\/li>\n<li>\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u0437\u0430\u0438\u043d\u043a\u043b\u044e\u0434\u0435\u043d\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 <\/li>\n<\/ol>\n<p>  <\/p>\n<h2 id=\"zaklyuchenie\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>  <\/p>\n<p>\u0421\u0430\u043c\u044b\u043c \u043d\u0435 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u043e &quot;\u0447\u0435\u043c \u0431\u043b\u0438\u0436\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043a \u043a\u043e\u0434\u0443, \u0442\u0435\u043c \u043e\u043d\u0430 \u0433\u043b\u0430\u0432\u043d\u0435\u0435&quot; \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u0434\u043b\u044f \u0433\u0440\u0443\u043f\u043f, \u0430 \u0437\u0430\u0442\u0435\u043c \u0442\u0430\u043a\u043e\u0435 \u0436\u0435 \u043f\u0440\u0430\u0432\u0438\u043b\u043e \u0438 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432\u043d\u0443\u0442\u0440\u0438 .gitlab-ci.yml, \u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0441 \u0443\u0441\u043b\u043e\u0432\u0438\u0435\u043c \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u0433\u0440\u0443\u043f\u043f\u0430\u0445 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u043d\u044b.<br \/>  \u0414\u0430\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u043c \u043c\u0435\u0441\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u0438 \u0437\u0430\u0438\u043d\u043a\u043b\u044e\u0434\u0435\u043d\u043d\u043e\u0433\u043e .gitlab-ci.yml \u2013 \u043e\u0431\u0449\u0435\u0435. \u0418 \u0442\u043e\u0442 \u0444\u0430\u0439\u043b \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0438\u043d\u043a\u043b\u044e\u0434 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442.<\/p>\n<\/div>\n<p> \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\/post\/491490\/\"> https:\/\/habr.com\/ru\/post\/491490\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/491490\/\">\n<h2 id=\"peremennye-v-gitlab-mozhno-zadat-v-neskolkih-mestah\">\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 Gitlab \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043c\u0435\u0441\u0442\u0430\u0445:<\/h2>\n<p>  <\/p>\n<ol>\n<li>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0433\u0440\u0443\u043f\u043f<\/li>\n<li>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430<\/li>\n<li>\u0412\u043d\u0443\u0442\u0440\u0438 .gitlab-ci.yml<\/li>\n<\/ol>\n<p>  <\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0432 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0433\u0440\u0443\u043f\u043f \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043a\u0430\u043a &quot;\u0444\u0430\u0439\u043b&quot;\u0438\u043b\u0438 &quot;\u043e\u0431\u044b\u0447\u043d\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e&quot; \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0433\u0430\u043b\u043e\u0447\u043a\u0438 &quot;\u0437\u0430\u0449\u0438\u0449\u0435\u043d\u043e&quot; \u0438 &quot;\u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u0430\u0442\u044c&quot;.<\/p>\n<p>  <\/p>\n<p><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/iu\/2f\/d2\/iu2fd2ums7tmrkyqb4hrbhuenzg.png\"\/><\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u043d\u0430\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0442\u044c\u0441\u044f.<\/p>\n<p>  <\/p>\n<p><em>\u0421 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435\u0439 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043e\u0432 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0432 \u043a\u043e\u043d\u0446\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.<\/em><\/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-299834","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299834","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=299834"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/299834\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=299834"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=299834"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=299834"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}