{"id":4112,"date":"2025-07-04T18:09:47","date_gmt":"2025-07-04T15:09:47","guid":{"rendered":"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/gitlab-ci-cd\/"},"modified":"2025-07-04T18:13:53","modified_gmt":"2025-07-04T15:13:53","slug":"gitlab-ci-cd","status":"publish","type":"docs","link":"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/gitlab-ci-cd\/","title":{"rendered":"GitLab CI\/CD (\u041d\u0435\u043f\u0440\u0435\u0440\u044b\u0432\u043d\u0430\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f \u0438 \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0430 \u0432 GitLab)"},"content":{"rendered":"\n<p><strong>GitLab <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/continuous-integration\/\" data-internallinksmanager029f6b8e52c=\"369\" title=\"Continuous Integration (CI)\">CI<\/a>\/CD<\/strong> \u2014 \u044d\u0442\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0443 GitLab, \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0432\u0430\u044e\u0449\u0430\u044f \u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c \u043d\u0430\u0434 \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u044b\u043c \u0446\u0438\u043a\u043b\u043e\u043c \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438: \u043e\u0442 \u043a\u043e\u043c\u043c\u0438\u0442\u0430 \u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043e \u0441\u0431\u043e\u0440\u043a\u0438, \u0434\u0435\u043f\u043b\u043e\u044f \u0438 \u043c\u043e\u043d\u0438\u0442\u043e\u0440\u0438\u043d\u0433\u0430. \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 \u0444\u0430\u0439\u043b <strong><code>.gitlab-ci.yml<\/code><\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u043a\u0430\u043a \u043a\u043e\u0434.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u0427\u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 GitLab CI\/CD<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u044b \u0438 \u0441\u0431\u043e\u0440\u043a\u0438<\/strong> \u043f\u0440\u0438 \u043a\u0430\u0436\u0434\u043e\u043c \u043f\u0443\u0448\u0435 \u0438\u043b\u0438 pull\/merge request;<\/li>\n\n\n\n<li><strong>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0434\u0435\u043f\u043b\u043e\u0439<\/strong> \u043d\u0430 staging \u0438 production \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0438\u043b\u0438 \u043f\u043e \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0443;<\/li>\n\n\n\n<li><strong>\u041a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438<\/strong> \u2014 \u0441 \u043b\u043e\u0433\u0430\u043c\u0438, \u0441\u0442\u0430\u0442\u0443\u0441\u0430\u043c\u0438, \u0433\u0440\u0430\u0444\u0430\u043c\u0438;<\/li>\n\n\n\n<li><strong>\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0441 \u0432\u043d\u0435\u0448\u043d\u0438\u043c\u0438 \u0441\u0435\u0440\u0432\u0438\u0441\u0430\u043c\u0438 \u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438<\/strong>: <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/docker\/\" data-internallinksmanager029f6b8e52c=\"258\" title=\"Docker\">Docker<\/a>, <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/kubernetes\/\" data-internallinksmanager029f6b8e52c=\"259\" title=\"Kubernetes (K8s)\">Kubernetes<\/a>, <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/helm-v-kubernetes\/\" data-internallinksmanager029f6b8e52c=\"350\" title=\"Helm (\u0432 Kubernetes)\">Helm<\/a>, <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/terraform\/\" data-internallinksmanager029f6b8e52c=\"354\" title=\"Terraform (\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435\u043c \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b)\">Terraform<\/a>, Slack, <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/prometheus\/\" data-internallinksmanager029f6b8e52c=\"355\" title=\"Prometheus (\u0411\u0430\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432)\">Prometheus<\/a>, Sentry \u0438 \u0434\u0440.;<\/li>\n\n\n\n<li><strong>\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 DevSecOps<\/strong> \u2014 \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0441\u043a\u0430\u043d\u0435\u0440\u044b SAST, DAST, Dependency Scanning, Container Scanning, License Compliance;<\/li>\n\n\n\n<li><strong>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d<\/strong> \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445 \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u044b\u043c\u0438 \u044f\u0437\u044b\u043a\u0430\u043c\u0438 (<a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/node-v-kubernetes\/\" data-internallinksmanager029f6b8e52c=\"349\" title=\"Node (\u0432 Kubernetes)\">Node<\/a>.js, Python, Java \u0438 \u0434\u0440.).<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b GitLab CI<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>\u041a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442<\/th><th>\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435<\/th><\/tr><\/thead><tbody><tr><td><strong>Stages<\/strong><\/td><td>\u041f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u044d\u0442\u0430\u043f\u044b: <code>build<\/code>, <code>test<\/code>, <code>deploy<\/code>, <code>review<\/code>, <code>cleanup<\/code><\/td><\/tr><tr><td><strong>Jobs<\/strong><\/td><td>\u041a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u044d\u0442\u0430\u043f\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, <code>run unit tests<\/code>)<\/td><\/tr><tr><td><strong>Runners<\/strong><\/td><td>\u0418\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u0438 \u0437\u0430\u0434\u0430\u0447 (shared \u0438\u043b\u0438 custom, docker, shell, Kubernetes)<\/td><\/tr><tr><td><strong>Triggers<\/strong><\/td><td>\u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u043f\u043e \u0440\u0430\u0441\u043f\u0438\u0441\u0430\u043d\u0438\u044e \u0438\u043b\u0438 \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/api\/\" data-internallinksmanager029f6b8e52c=\"226\" title=\"API (Application Programming Interface)\">API<\/a><\/td><\/tr><tr><td><strong>Artifacts<\/strong><\/td><td>\u0424\u0430\u0439\u043b\u044b, \u043f\u0435\u0440\u0435\u0434\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u043c\u0435\u0436\u0434\u0443 \u0437\u0430\u0434\u0430\u0447\u0430\u043c\u0438 \u0438\u043b\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c\u044b\u0435 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/td><\/tr><tr><td><strong>Environments<\/strong><\/td><td>\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b \u0438 \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 rollout&#8217;\u0430\u043c\u0438 \u043d\u0430 stage\/prod<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0431\u0430\u0437\u043e\u0432\u043e\u0433\u043e <code>.gitlab-ci.yml<\/code><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>stages:\n  - test\n  - build\n  - deploy\n\ntest:\n  stage: test\n  image: node:20\n  script:\n    - npm ci\n    - npm run test\n\nbuild:\n  stage: build\n  image: docker:latest\n  services:\n    - docker:dind\n  script:\n    - docker build -t registry.gitlab.com\/mygroup\/app:$CI_COMMIT_SHORT_SHA .\n    - docker push registry.gitlab.com\/mygroup\/app:$CI_COMMIT_SHORT_SHA\n\ndeploy:\n  stage: deploy\n  script:\n    - helm upgrade --install app .\/helm \\\n        --set image.tag=$CI_COMMIT_SHORT_SHA \\\n        --namespace production\n  only:\n    - main\n<\/code><\/pre>\n\n\n\n<p>\ud83d\udccc \u042d\u0442\u043e\u0442 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d: \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0442\u0435\u0441\u0442\u044b, \u0431\u0438\u043b\u0434\u0438\u0442 Docker-\u043e\u0431\u0440\u0430\u0437 \u0438 \u0434\u0435\u043f\u043b\u043e\u0438\u0442 \u0447\u0435\u0440\u0435\u0437 Helm.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 GitLab CI\/CD<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u0415\u0434\u0438\u043d\u0430\u044f \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430<\/strong>: \u043a\u043e\u0434, \u0440\u0435\u0432\u044c\u044e, CI\/CD, \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u2014 \u0432\u0441\u0451 \u0432 \u043e\u0434\u043d\u043e\u043c \u043c\u0435\u0441\u0442\u0435;<\/li>\n\n\n\n<li><strong>Pipeline-as-Code<\/strong>: \u0432\u0441\u044f \u043b\u043e\u0433\u0438\u043a\u0430 \u0445\u0440\u0430\u043d\u0438\u0442\u0441\u044f \u0438 \u0432\u0435\u0440\u0441\u0438\u043e\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0440\u044f\u0434\u043e\u043c \u0441 \u043a\u043e\u0434\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430;<\/li>\n\n\n\n<li><strong>\u0423\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c<\/strong>: \u043e\u0442 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0434\u043e \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043c\u043d\u043e\u0433\u043e\u043a\u043e\u043d\u0442\u0443\u0440\u043d\u044b\u0445 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u043e\u0432;<\/li>\n\n\n\n<li><strong>\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e<\/strong>: \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b DevSecOps \u0431\u0435\u0437 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441 \u043d\u0443\u043b\u044f;<\/li>\n\n\n\n<li><strong>\u0413\u0438\u0431\u043a\u0430\u044f \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0430\u0446\u0438\u044f<\/strong>: \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 (<code>rules<\/code>, <code>only\/except<\/code>), \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438, dynamic child pipelines \u0438 \u043c\u043d\u043e\u0433\u043e\u0435 \u0434\u0440\u0443\u0433\u043e\u0435.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 DevOps\/DevSecOps<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>SAST, DAST, Container Scanning, License Compliance<\/strong> \u2014 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u043e\u0439;<\/li>\n\n\n\n<li><strong>Scan results \u2192 MR Widget<\/strong> \u2014 \u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u044f\u043c\u043e \u0432 merge request;<\/li>\n\n\n\n<li><strong>Security Dashboard<\/strong> \u2014 \u0441\u0432\u043e\u0434\u043d\u0430\u044f \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0430 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043f\u043e \u0432\u0441\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c;<\/li>\n\n\n\n<li><strong>Policies \u0438 approvals<\/strong> \u2014 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u043b\u044f \u043f\u0440\u043e\u0434\u0430\u043a\u0448\u043d-\u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0439 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0434\u0430.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p><strong>GitLab CI\/CD<\/strong> \u2014 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e CI-\u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442, \u0430 <strong>\u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f DevOps-\u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u0430<\/strong>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u043c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u044b \u043e\u0442 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u043e \u0434\u043e\u0441\u0442\u0430\u0432\u043a\u0438 \u0438 \u0431\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u0412\u043e\u0442 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0435\u043d\u0438\u0435 \u2014 <strong>\u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u0438 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f GitLab CI\/CD<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0435\u043a\u0442:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u0440\u0438\u043c\u0435\u0440: <code>.gitlab-ci.yml<\/code> \u0441 multi-stage pipeline, Docker, Helm, \u0438 SAST<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>stages:\n  - lint\n  - test\n  - build\n  - security\n  - deploy\n\nvariables:\n  IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHORT_SHA\n\nlint:\n  stage: lint\n  image: node:20\n  script:\n    - npm ci\n    - npm run lint\n\ntest:\n  stage: test\n  image: node:20\n  script:\n    - npm run test:ci\n\nbuild:\n  stage: build\n  image: docker:20\n  services:\n    - docker:dind\n  script:\n    - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY\n    - docker build -t $IMAGE_TAG .\n    - docker push $IMAGE_TAG\n\nsecurity-sast:\n  stage: security\n  image: docker:20\n  allow_failure: true\n  script:\n    - docker run --rm -v $(pwd):\/src returntocorp\/semgrep --config=auto\n  rules:\n    - if: '$CI_COMMIT_BRANCH == \"main\"'\n\ndeploy-prod:\n  stage: deploy\n  image: alpine\/k8s:1.27.4\n  script:\n    - helm upgrade --install app .\/helm \\\n        --namespace production \\\n        --set image.repository=$CI_REGISTRY_IMAGE \\\n        --set image.tag=$CI_COMMIT_SHORT_SHA\n  only:\n    - main\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f dynamic review apps (merge requests)<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>review:\n  stage: deploy\n  environment:\n    name: review\/$CI_COMMIT_REF_NAME\n    url: <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/https\/\" data-internallinksmanager029f6b8e52c=\"221\" title=\"HTTPS (Hyper Text Transfer Protocol Secure)\">https<\/a>:\/\/$CI_COMMIT_REF_SLUG.example.com\n  script:\n    - helm upgrade --install app-$CI_COMMIT_REF_SLUG .\/helm \\\n        --namespace review \\\n        --set image.tag=$CI_COMMIT_SHORT_SHA \\\n        --set <a href=\"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/kubernetes-ingress\/\" data-internallinksmanager029f6b8e52c=\"363\" title=\"Kubernetes Ingress (\u041c\u0430\u0440\u0448\u0440\u0443\u0442\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0440\u0430\u0444\u0438\u043a\u0430 \u0432 Kubernetes)\">ingress<\/a>.host=$CI_COMMIT_REF_SLUG.example.com\n  only:\n    - merge_requests\n<\/code><\/pre>\n\n\n\n<p>\ud83d\udccc \u042d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 merge request.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"> GitLab Runner: \u0437\u0430\u043f\u0443\u0441\u043a \u0432 Docker (standalone)<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -d --name gitlab-runner --restart always \\\n  -v \/srv\/gitlab-runner\/config:\/etc\/gitlab-runner \\\n  -v \/var\/run\/docker.sock:\/var\/run\/docker.sock \\\n  gitlab\/gitlab-runner:latest\n<\/code><\/pre>\n\n\n\n<p>\u0417\u0430\u0442\u0435\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u0443\u0435\u0448\u044c:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker exec -it gitlab-runner gitlab-runner register\n<\/code><\/pre>\n","protected":false},"featured_media":0,"parent":2927,"menu_order":173,"comment_status":"open","ping_status":"closed","template":"","doc_tag":[],"class_list":["post-4112","docs","type-docs","status-publish","hentry"],"comment_count":0,"_links":{"self":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4112","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/comments?post=4112"}],"version-history":[{"count":1,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4112\/revisions"}],"predecessor-version":[{"id":4114,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4112\/revisions\/4114"}],"up":[{"embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/2927"}],"next":[{"title":"Volume Snapshot (\u0421\u043d\u0430\u043f\u0448\u043e\u0442 \u0442\u043e\u043c\u0430)","link":"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/volume-snapshot\/","href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4115"}],"prev":[{"title":"Blue-Green Deployment (\u0411\u0435\u0437\u043e\u043f\u0430\u0441\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439)","link":"https:\/\/cloudvps.by\/community\/docs\/glossarij\/terminy\/blue-green-deployment\/","href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/docs\/4092"}],"wp:attachment":[{"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/media?parent=4112"}],"wp:term":[{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/cloudvps.by\/community\/wp-json\/wp\/v2\/doc_tag?post=4112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}