{"id":328282,"date":"2022-01-19T21:00:07","date_gmt":"2022-01-19T21:00:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=328282"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=328282","title":{"rendered":"<span>Gitlab CI \u00abSmart\u00bb Pipeline: \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u0438 \u0438 \u0434\u0435\u0442\u0438<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"\u0420\u0430\u043d\u044c\u0448\u0435 \u0434\u0430\u0436\u0435 \u043d\u0435 \u043c\u043e\u0433 \u0441\u0435\u0431\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0420\u0443\u0441\u0441\u043a\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u043e\u0439 \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 CICD \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0435\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u044c)\" title=\"\u0420\u0430\u043d\u044c\u0448\u0435 \u0434\u0430\u0436\u0435 \u043d\u0435 \u043c\u043e\u0433 \u0441\u0435\u0431\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0420\u0443\u0441\u0441\u043a\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u043e\u0439 \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 CICD \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0435\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u044c)\" height=\"960\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/862\/6d1\/4d1\/8626d14d1c2c0e1ccdebfb88d8cb992b.png\" data-width=\"960\"\/><figcaption>\u0420\u0430\u043d\u044c\u0448\u0435 \u0434\u0430\u0436\u0435 \u043d\u0435 \u043c\u043e\u0433 \u0441\u0435\u0431\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0420\u0443\u0441\u0441\u043a\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u043e\u0439 \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 CICD \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0435\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u044c)<\/figcaption><\/figure>\n<h3>\u0421 \u0447\u0435\u0433\u043e \u0432\u0441\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c<\/h3>\n<p>\u0417\u0430 \u0431\u043e\u043b\u0435\u0435 3\u0445 \u043b\u0435\u0442\u043d\u0438\u0439 \u0441\u0440\u043e\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0443 \u043d\u0430\u0441 \u0441\u043e\u0431\u0440\u0430\u043b\u043e\u0441\u044c  \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c 20 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0441\u043e spark \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 CICD \u0431\u044b\u043b  \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0430 Jenkins. \u0421 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0443 GitLab CI \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c  \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 CICD. \u041d\u043e \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435  \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u0432\u0441\u0435\u0440\u044c\u0435\u0437 \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432  Jenkins \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u043e \u0447\u0435\u0433\u043e \u0442\u0435\u0431\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043d\u0430 Groovy.  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 WebUI \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438  \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0431\u043e\u0440\u043e\u043a. \u041f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b GitlabCI \u044f \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u044d\u0442\u043e  \u043a\u0430\u043a \u0436\u0430\u043b\u043a\u043e\u0435 \u043f\u043e\u0434\u043e\u0431\u0438\u0435 Jenkins: \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0443 \u0447\u0442\u043e-\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0435  \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0435, \u044f \u0443\u0436\u0435 \u043c\u043e\u043b\u0447\u0443 \u043f\u0440\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443.<\/p>\n<p>\u041d\u043e \u043f\u0440\u043e\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0438 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u043a\u0430\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0448\u0430\u0440\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438  \u0434\u0436\u043e\u0431\u044b, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c  \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u0434\u0430. <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0443 \u0432\u0430\u0441 \u0433\u0434\u0435-\u0442\u043e \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043b\u0435\u0436\u0430\u0442 yml,  \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0447\u0442\u043e-\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442  \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<pre><code class=\"yaml\">    include:     - project: 'gitlabci\/cicd'     ref: v1     file:       - 'pipelines\/product1\/.base_pipelines_spark_project.yml'<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c include \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0434\u0436\u043e\u0431\u0430 \u0443 \u0441\u0435\u0431\u044f \u0432 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0435 \u0438 \u043f\u0440\u044f\u043c \u0441\u0442\u0430\u043b\u043e  \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043a\u0438\u043b\u043b\u0435\u0440 \u0444\u0438\u0447. \u0418 \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043d\u0430 GitLabCI  \u0443\u0436\u0435 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043a\u0430\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c, \u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0436\u0435\u043b\u0430\u043d\u0438\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c  \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443.<\/p>\n<h3>\u0427\u0442\u043e \u0431\u044b\u043b\u043e<\/h3>\n<p>&#8212; \u0431\u043e\u043b\u0435\u0435 20 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0432 gitlab spark \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432;<\/p>\n<p>&#8212; \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441\u043e spark \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 spark + kafka;<\/p>\n<p>&#8212; CICD \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0430 Jenkins<\/p>\n<h3>\u0427\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c<\/h3>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e CICD \u0441 Jenkins \u043d\u0430 Gitlab CI c \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c  \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0448\u0430\u0433\u043e\u0432: \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0435\u043b\u0430 \u0431\u044b \u0432\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0442\u043e  \u043c\u043e\u0433\u043b\u0430 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0430 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0442\u0438\u043f\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c  \u0442\u0430\u043a\u043e\u0439-\u0442\u043e \u0444\u0430\u0439\u043b \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0443\u0434\u0430 \u0442\u0430\u043a\u043e\u0439-\u0442\u043e yaml \u043a\u043e\u0434 \u0438 \u0447\u0442\u043e\u0431\u044b  \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043f\u0440\u0438\u0447\u0435\u043c \u0431\u0435\u0437 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b devops  \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<h3>\u041d\u0430\u0447\u0430\u043b\u043e<\/h3>\n<p>\u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 Spark \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0431\u044b\u043b\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443  \u0438\u0437 2-\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432: \u0441 \u043a\u0430\u0444\u043a\u0430 \u0438\u043b\u0438 \u0431\u0435\u0437. \u041e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c job \u0431\u044b\u043b\u043e \u043d\u0435  \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b 2 yaml, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c  \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/p>\n<pre><code class=\"yaml\">    include:       # PRODUCT1       - project: 'gitlabci\/integration-test'       ref: v2       file:         - 'product1\/etl\/.base_integration_test.yml'         - 'product1\/etl\/.base_integration_test_with_kafka.yml'<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b <strong>.gitlab-ci.yml <\/strong>\u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b  \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0442\u0430\u043a\u0438\u043c  \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u043e\u0434\u0430 \u0432<strong> test\/fixtures.py <\/strong>\u043c\u043e\u0433  \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c. \u0420\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c  \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u0434\u0430\u043b\u044c\u0448\u0435.  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c job, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u043b  \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <strong>CICD_KAFKA_HOST<\/strong><em> \u043b\u0438\u0431\u043e \u0432 true \u043b\u0438\u0431\u043e \u0432 false<\/em><\/p>\n<pre><code class=\"yaml\">    prepare_test:       script:         - export CICD_KAFKA_HOST=$(cat test\/fixtures.py | grep KAFKA_HOST)         - >           if [ \"$CICD_KAFKA_HOST\" != \"\" ]; then             export CICD_KAFKA_HOST=\"true\"           else             export CICD_KAFKA_HOST=\"false\"           fi         - echo \"CICD_KAFKA_HOST=$CICD_KAFKA_HOST\" >> dotenv.env       artifacts:         reports:           dotenv:             - dotenv.env<\/code><\/pre>\n<p>\u0438 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 job \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043b\u0438\u0431\u043e c \u043a\u0430\u0444\u043a\u0430 \u043b\u0438\u0431\u043e \u0431\u0435\u0437.  \u041d\u043e \u043f\u043e \u0445\u043e\u0434\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c rules \u043d\u0435\u043b\u044c\u0437\u044f, \u043f\u043e\u0442\u043e\u043c\u0443  variables \u0434\u043b\u044f rules \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c  \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b\/\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f extends  \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<pre><code class=\"yaml\">    integration_test:       extends: .base_integration_test_with_kafka       rules:         - if: '$CICD_KAFKA_HOST == \"true\"'<\/code><\/pre>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0434\u0435\u0438 &#171;smart&#187; \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u043b\u0430\u0441\u044c \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044e. \u041d\u041e \u043f\u043e \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u0439\u0442\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b.<\/p>\n<h3>\u0422\u0440\u0438\u0433\u0433\u0435\u0440<\/h3>\n<figure class=\"\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"\u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u044b\u0448\u0435\u043b \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0437\u043e\u043d \u0442\u0435\u043b\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0430 &quot;\u0422\u0440\u0438\u0433\u0433\u0435\u0440&quot; \u043e\u0442 \u043f\u0440\u043e\u0434\u044e\u0441\u0435\u0440\u0441\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0421\u0440\u0435\u0434\u0430, \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0437\u043e\u043d\u044b \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u0430, \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443\u0435\u0442 \u0433\u0435\u0440\u043e\u0439 \u041c\u0430\u043a\u0441\u0438\u043c\u0430 \u041c\u0430\u0442\u0432\u0435\u0435\u0432\u0430\" title=\"\u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u044b\u0448\u0435\u043b \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0437\u043e\u043d \u0442\u0435\u043b\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0430 &quot;\u0422\u0440\u0438\u0433\u0433\u0435\u0440&quot; \u043e\u0442 \u043f\u0440\u043e\u0434\u044e\u0441\u0435\u0440\u0441\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0421\u0440\u0435\u0434\u0430, \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0437\u043e\u043d\u044b \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u0430, \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443\u0435\u0442 \u0433\u0435\u0440\u043e\u0439 \u041c\u0430\u043a\u0441\u0438\u043c\u0430 \u041c\u0430\u0442\u0432\u0435\u0435\u0432\u0430\" height=\"686\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/00b\/b57\/5d9\/00bb575d963f64b49061bc36ef9960d3.png\" data-width=\"504\"\/><figcaption>\u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u044b\u0448\u0435\u043b \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0437\u043e\u043d \u0442\u0435\u043b\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0430 &#171;\u0422\u0440\u0438\u0433\u0433\u0435\u0440&#187; \u043e\u0442 \u043f\u0440\u043e\u0434\u044e\u0441\u0435\u0440\u0441\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0421\u0440\u0435\u0434\u0430, \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0437\u043e\u043d\u044b \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u0430, \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443\u0435\u0442 \u0433\u0435\u0440\u043e\u0439 \u041c\u0430\u043a\u0441\u0438\u043c\u0430 \u041c\u0430\u0442\u0432\u0435\u0435\u0432\u0430<\/figcaption><\/figure>\n<p>\u0422\u0440\u0438\u0433\u0433\u0435\u0440  \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435 \u0434\u0440\u0443\u0433\u043e\u0439  \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d. \u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c, \u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0439 \u0434\u0440\u0443\u0433\u043e\u0439  \u043f\u0430\u0439\u043f\u043b\u0430\u043d \u0440\u0435\u0431\u0435\u043d\u043a\u043e\u043c.<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0442\u0430\u043a\u043e\u0439<\/p>\n<pre><code class=\"yaml\">    # --------------- Prepare Test ---------------      prepare_test:       image: platform\/docker-images\/vault:1.8       variables:         CONTEXT_TEST: |           include:           # PRODUCT           - project: 'gitlabci\/integration-test'             ref: v2             file:               - 'product1\/etl\/.base_integration_test.yml'               - 'product1\/etl\/.base_integration_test_with_kafka.yml'           integration_test:             variables:               COVERAGE_SOURCE: \".\/src\"         INTEGRATION_TEST: |           $CONTEXT_TEST             extends: .base_integration_test         INTEGRATION_TEST_WITH_KAFKA: |           $CONTEXT_TEST             extends: .base_integration_test_with_kafka      stage: prepare_test       script:         - export CICD_KAFKA_HOST=$(cat test\/fixtures.py | grep KAFKA_HOST)         - >           if [ \"$CICD_KAFKA_HOST\" != \"\" ]; then             export CICD_KAFKA_HOST=\"true\"             echo \"$INTEGRATION_TEST_WITH_KAFKA\" >> test.yml           else             export CICD_KAFKA_HOST=\"false\"             echo \"$INTEGRATION_TEST\" >> test.yml           fi         - env | sort -f       artifacts:         paths:           - test.yml         expire_in: 7200 seconds      # --------------- Integration test ---------------      integration_test:       stage: test       trigger:         include:           - artifact: test.yml             job: prepare_test         strategy: depend<\/code><\/pre>\n<p>\u0412 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0432  \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d: \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0443\u0441\u043a  \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430-\u0440\u0435\u0431\u0435\u043d\u043a\u0430<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"Gitlab CI: Pipeline \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c pipeline \u0440\u0435\u0431\u0435\u043d\u043e\u043a\" title=\"Gitlab CI: Pipeline \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c pipeline \u0440\u0435\u0431\u0435\u043d\u043e\u043a\" height=\"319\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e67\/a40\/97d\/e67a4097deacaf06690ccf930e282b22.png\" data-width=\"574\"\/><figcaption>Gitlab CI: Pipeline \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c pipeline \u0440\u0435\u0431\u0435\u043d\u043e\u043a<\/figcaption><\/figure>\n<p>\u0422\u0430\u043a\u0438\u0435  \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c smart \u043d\u0430\u0447\u0430\u043b\u043e: \u043e\u043d \u0443\u043c\u0435\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439  \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438 \u0432 job \u0441 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u0442  \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c: \u043b\u0438\u0431\u043e \u0441 \u043a\u0430\u0444\u043a\u0430 \u043b\u0438\u0431\u043e \u0431\u0435\u0437. \u041d\u0430\u0447\u0430\u043b\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e, \u041d\u041e  \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u21162: \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f pipeline \u0440\u0435\u0431\u0435\u043d\u043a\u0430 &#8212;  \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 coverage \u043e\u0442\u0447\u0435\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430\u0445 \u043c\u044b \u0434\u0430\u043b\u0435\u0435  \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432 job c <strong>SonarQube<\/strong>. \u0420\u0435\u0448\u0438\u0442\u044c  \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u043c\u0435\u0436\u0434\u0443 job artifact \u0432 \u0432\u0438\u0434\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u0430\u043a \u0440\u0430\u043d\u044c\u0448\u0435 \u0431\u044b\u043b\u043e  \u043d\u0435\u043b\u044c\u0437\u044f, \u0432\u0435\u0440\u043d\u0443\u0442\u044c artifact \u0438\u0437 child \u0432 parent \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0435  \u0440\u0435\u0448\u0435\u043d\u0438\u0435 &#8212; \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c upload artifact \u0432 \u043d\u0430\u0448 aftifactory \u0438 \u0432 job c  SonarQube \u043f\u0440\u043e\u0441\u0442\u043e \u0435\u0433\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c. \u041d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u044f\u0449\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431,  \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a Artifactory. \u0418 \u0441\u043f\u043e\u0441\u043e\u0431 \u0431\u044b\u043b  \u043d\u0430\u0439\u0434\u0435\u043d: <strong>Gitlab CI API<\/strong><\/p>\n<h3>Gitlab CI API: download child artifacts<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a Gitlab CI API \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e  \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c  token. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f API \u0441\u043a\u0430\u0447\u0430\u0442\u044c artifact \u0438\u0437 pipeline  \u0440\u0435\u0431\u0435\u043d\u043a\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c \u0435\u0433\u043e <strong>CI_JOB_ID<\/strong>.<\/p>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/api\/job_artifacts.html\" rel=\"noopener noreferrer nofollow\">GET \/projects\/:id\/jobs\/:job_id\/artifacts <\/a><\/p>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 pipeline \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f?<\/p>\n<p>&#8212; \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c ID pipeline \u0440\u0435\u0431\u0435\u043d\u043a\u0430<\/p>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/api\/jobs.html\" rel=\"noopener noreferrer nofollow\">GET \/projects\/:id\/pipelines\/:pipeline_id\/bridges<\/a><\/p>\n<p>&#8212; \u043f\u043e id pipeline \u0440\u0435\u0431\u0435\u043d\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c id job<\/p>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/api\/jobs.html\" rel=\"noopener noreferrer nofollow\">GET \/projects\/:id\/pipelines\/:pipeline_id\/jobs<\/a><\/p>\n<p>&#8212; \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <a href=\"https:\/\/docs.gitlab.com\/ee\/api\/job_artifacts.html\" rel=\"noopener noreferrer nofollow\">\/projects\/:id\/jobs\/:job_id\/artifacts <\/a><\/p>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f job \u043f\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044e artifacts \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c  \u0442\u0430\u043a: \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043a\u0443\u0434\u0430 \u0432\u0445\u043e\u0434\u0438\u0442 \u0438 \u043d\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439  \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 token &#8212; <strong>GITLAB_USER_TOKEN<\/strong> \u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 json \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442  Gitlab API \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 jq<\/p>\n<pre><code class=\"yaml\">    get_cicd_artifact:       image: platform\/docker-images\/ansible:2.9.24-9       stage: get_cicd_artifact       script:         - >           export CI_CHILD_PIPELINE_ID=$(curl --header \"PRIVATE-TOKEN: $GITLAB_USER_TOKEN\" \"$CI_API_V4_URL\/projects\/$CI_PROJECT_ID\/pipelines\/$CI_PIPELINE_ID\/bridges\" | jq \".[].downstream_pipeline.id\")         - echo $CI_CHILD_PIPELINE_ID         - >           export CI_CHILD_JOB_ID=$(curl --header \"PRIVATE-TOKEN: $GITLAB_USER_TOKEN\" \"$CI_API_V4_URL\/projects\/$CI_PROJECT_ID\/pipelines\/$CI_CHILD_PIPELINE_ID\/jobs\" | jq '.[].id')         - echo $CI_CHILD_JOB_ID         - 'curl --output artifacts.zip --header \"PRIVATE-TOKEN: $GITLAB_USER_TOKEN\" \"$CI_API_V4_URL\/projects\/$CI_PROJECT_ID\/jobs\/$CI_CHILD_JOB_ID\/artifacts\"'         - unzip artifacts.zip         - ls -las coverage-reports         - rm -rf artifacts.tar       dependencies:         - integration_test       artifacts:         paths:           - coverage-reports\/<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c Multi-project \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0438\u043c\u0445\u043e \u0441\u043e &#171;smart&#187; \u0444\u0438\u0447\u043e\u0439<\/p>\n<figure class=\"full-width\"><img decoding=\"async\" src=\"\/img\/image-loader.svg\" alt=\"Gitlab CI Multi-project pipelines\" title=\"Gitlab CI Multi-project pipelines\" height=\"266\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/21a\/0f1\/5fc\/21a0f15fc8a95607912b6418d1e43156.png\" data-width=\"866\"\/><figcaption>Gitlab CI Multi-project pipelines<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/post\/646587\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u041a\u0430\u043a\u0438\u0435 CI\/CD \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             27.27%           <\/span> <span class=\"tm-article-poll__answer-label\">Jenkins<\/span> <span class=\"tm-article-poll__answer-votes\">             6           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:27.27%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             86.36%           <\/span> <span class=\"tm-article-poll__answer-label\">Gitlab CI<\/span> <span class=\"tm-article-poll__answer-votes\">             19           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:86.36%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             22.73%           <\/span> <span class=\"tm-article-poll__answer-label\">TeamCity<\/span> <span class=\"tm-article-poll__answer-votes\">             5           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:22.73%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             0%           <\/span> <span class=\"tm-article-poll__answer-label\">Bamboo CI<\/span> <span class=\"tm-article-poll__answer-votes\">             0           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:0%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 22 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.           \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 2 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.      <\/div>\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\/646587\/\"> https:\/\/habr.com\/ru\/post\/646587\/<\/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_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption>\u0420\u0430\u043d\u044c\u0448\u0435 \u0434\u0430\u0436\u0435 \u043d\u0435 \u043c\u043e\u0433 \u0441\u0435\u0431\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u0435\u0436\u0434\u0443 \u0420\u0443\u0441\u0441\u043a\u043e\u0439 \u043a\u043b\u0430\u0441\u0441\u0438\u043a\u043e\u0439 \u0438 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 CICD \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0435\u0441\u0442\u044c \u0441\u0432\u044f\u0437\u044c)<\/figcaption><\/figure>\n<h3>\u0421 \u0447\u0435\u0433\u043e \u0432\u0441\u0435 \u043d\u0430\u0447\u0430\u043b\u043e\u0441\u044c<\/h3>\n<p>\u0417\u0430 \u0431\u043e\u043b\u0435\u0435 3\u0445 \u043b\u0435\u0442\u043d\u0438\u0439 \u0441\u0440\u043e\u043a \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u0430 \u0443 \u043d\u0430\u0441 \u0441\u043e\u0431\u0440\u0430\u043b\u043e\u0441\u044c  \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c 20 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0441\u043e spark \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438. \u041f\u0440\u043e\u0446\u0435\u0441\u0441 CICD \u0431\u044b\u043b  \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0430 Jenkins. \u0421 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 \u0443 GitLab CI \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c  \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0435 CICD. \u041d\u043e \u0434\u043e\u043b\u0433\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u044f \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435  \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u0432\u0441\u0435\u0440\u044c\u0435\u0437 \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. \u0422\u0430\u043a \u043a\u0430\u043a \u043c\u043d\u0435 \u043d\u0440\u0430\u0432\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432  Jenkins \u043c\u043e\u0436\u043d\u043e \u0432\u0437\u044f\u0442\u044c \u0438 \u0434\u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u043e \u0447\u0435\u0433\u043e \u0442\u0435\u0431\u0435 \u043d\u0435 \u0445\u0432\u0430\u0442\u0430\u0435\u0442 \u043d\u0430 Groovy.  \u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 WebUI \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438  \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u0431\u043e\u0440\u043e\u043a. \u041f\u043e\u043d\u0430\u0447\u0430\u043b\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b GitlabCI \u044f \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u043b \u044d\u0442\u043e  \u043a\u0430\u043a \u0436\u0430\u043b\u043a\u043e\u0435 \u043f\u043e\u0434\u043e\u0431\u0438\u0435 Jenkins: \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0443 \u0447\u0442\u043e-\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0435  \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0435, \u044f \u0443\u0436\u0435 \u043c\u043e\u043b\u0447\u0443 \u043f\u0440\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443.<\/p>\n<p>\u041d\u043e \u043f\u0440\u043e\u0448\u043b\u043e \u0432\u0440\u0435\u043c\u044f \u0438 \u043c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0438 \u043a\u0430\u043a \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0448\u0430\u0440\u0438\u0442\u044c \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u043c\u0438  \u0434\u0436\u043e\u0431\u044b, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u0434 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0430 \u0441 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c  \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043a\u043e\u0434\u0430. <\/p>\n<p>\u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0443 \u0432\u0430\u0441 \u0433\u0434\u0435-\u0442\u043e \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438 \u043b\u0435\u0436\u0430\u0442 yml,  \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0447\u0442\u043e-\u0442\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0443 \u0432\u0430\u0441 \u043c\u043e\u0436\u0435\u0442  \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c\u0441\u044f \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043e\u0434\u043d\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<pre><code class=\"yaml\">    include:     - project: 'gitlabci\/cicd'     ref: v1     file:       - 'pipelines\/product1\/.base_pipelines_spark_project.yml'<\/code><\/pre>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u044f\u0442\u044c include \u043a\u0430\u043a\u043e\u0433\u043e-\u0442\u043e \u0434\u0436\u043e\u0431\u0430 \u0443 \u0441\u0435\u0431\u044f \u0432 \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0435 \u0438 \u043f\u0440\u044f\u043c \u0441\u0442\u0430\u043b\u043e  \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u043a\u0438\u043b\u043b\u0435\u0440 \u0444\u0438\u0447. \u0418 \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u043c\u043e\u043c\u0435\u043d\u0442 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043d\u0430 GitLabCI  \u0443\u0436\u0435 \u043d\u0435 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u043e \u043a\u0430\u043a \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u044c, \u0430 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u043c \u0436\u0435\u043b\u0430\u043d\u0438\u0435\u043c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c  \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443.<\/p>\n<h3>\u0427\u0442\u043e \u0431\u044b\u043b\u043e<\/h3>\n<p>&#8212; \u0431\u043e\u043b\u0435\u0435 20 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432 \u0432 gitlab spark \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432;<\/p>\n<p>&#8212; \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0441\u043e spark \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445 spark + kafka;<\/p>\n<p>&#8212; CICD \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d \u043d\u0430 Jenkins<\/p>\n<h3>\u0427\u0442\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c<\/h3>\n<p>\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e CICD \u0441 Jenkins \u043d\u0430 Gitlab CI c \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u043c  \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u0448\u0430\u0433\u043e\u0432: \u0447\u0442\u043e\u0431\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0435\u0441\u043b\u0438 \u0445\u043e\u0442\u0435\u043b\u0430 \u0431\u044b \u0432\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u0442\u043e  \u043c\u043e\u0433\u043b\u0430 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0430 \u0435\u0441\u043b\u0438 \u043d\u0435\u0442 \u0442\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0447\u0442\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0442\u0438\u043f\u0430 \u0441\u043e\u0437\u0434\u0430\u0442\u044c  \u0442\u0430\u043a\u043e\u0439-\u0442\u043e \u0444\u0430\u0439\u043b \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u0443\u0434\u0430 \u0442\u0430\u043a\u043e\u0439-\u0442\u043e yaml \u043a\u043e\u0434 \u0438 \u0447\u0442\u043e\u0431\u044b  \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e \u043f\u0440\u0438\u0447\u0435\u043c \u0431\u0435\u0437 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u043e\u043c\u043e\u0449\u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b devops  \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430.<\/p>\n<h3>\u041d\u0430\u0447\u0430\u043b\u043e<\/h3>\n<p>\u0412 \u043a\u0430\u0436\u0434\u043e\u043c \u0438\u0437 Spark \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043e \u0431\u044b\u043b\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443  \u0438\u0437 2-\u0445 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0435\u0432: \u0441 \u043a\u0430\u0444\u043a\u0430 \u0438\u043b\u0438 \u0431\u0435\u0437. \u041e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0432 \u043e\u0434\u043d\u043e\u043c job \u0431\u044b\u043b\u043e \u043d\u0435  \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b 2 yaml, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u043b\u0438\u0441\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c  \u043e\u0431\u0440\u0430\u0437\u043e\u043c<\/p>\n<pre><code class=\"yaml\">    include:       # PRODUCT1       - project: 'gitlabci\/integration-test'       ref: v2       file:         - 'product1\/etl\/.base_integration_test.yml'         - 'product1\/etl\/.base_integration_test_with_kafka.yml'<\/code><\/pre>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b <strong>.gitlab-ci.yml <\/strong>\u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b  \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u043b\u043e\u0433\u0438\u043a\u0443 \u0442\u0430\u043a\u0438\u043c  \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u043e\u0434\u0430 \u0432<strong> test\/fixtures.py <\/strong>\u043c\u043e\u0433  \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c. \u0420\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c  \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439, \u043f\u0435\u0440\u0432\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0431\u044b\u043b\u0430 \u0434\u0430\u043b\u044c\u0448\u0435.  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c job, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u043b  \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e <strong>CICD_KAFKA_HOST<\/strong><em> \u043b\u0438\u0431\u043e \u0432 true \u043b\u0438\u0431\u043e \u0432 false<\/em><\/p>\n<pre><code class=\"yaml\">    prepare_test:       script:         - export CICD_KAFKA_HOST=$(cat test\/fixtures.py | grep KAFKA_HOST)         - >           if [ \"$CICD_KAFKA_HOST\" != \"\" ]; then             export CICD_KAFKA_HOST=\"true\"           else             export CICD_KAFKA_HOST=\"false\"           fi         - echo \"CICD_KAFKA_HOST=$CICD_KAFKA_HOST\" >> dotenv.env       artifacts:         reports:           dotenv:             - dotenv.env<\/code><\/pre>\n<p>\u0438 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 job \u043d\u0443\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u043b\u0438\u0431\u043e c \u043a\u0430\u0444\u043a\u0430 \u043b\u0438\u0431\u043e \u0431\u0435\u0437.  \u041d\u043e \u043f\u043e \u0445\u043e\u0434\u0443 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u044b\u044f\u0441\u043d\u0438\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c rules \u043d\u0435\u043b\u044c\u0437\u044f, \u043f\u043e\u0442\u043e\u043c\u0443  variables \u0434\u043b\u044f rules \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u0438 \u043d\u0435 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c  \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b\/\u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u043d\u0432\u0435\u0439\u0435\u0440\u0430 \u0438 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f extends  \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u044b\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c.<\/p>\n<pre><code class=\"yaml\">    integration_test:       extends: .base_integration_test_with_kafka       rules:         - if: '$CICD_KAFKA_HOST == \"true\"'<\/code><\/pre>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u0434\u0435\u0438 &#171;smart&#187; \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0440\u0430\u0437 \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u043b\u0430\u0441\u044c \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044e. \u041d\u041e \u043f\u043e \u043d\u0430 \u043f\u043e\u043c\u043e\u0449\u044c \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u043f\u0440\u0438\u0439\u0442\u0438 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u044b.<\/p>\n<h3>\u0422\u0440\u0438\u0433\u0433\u0435\u0440<\/h3>\n<figure class=\"\"><figcaption>\u043d\u0435\u0434\u0430\u0432\u043d\u043e \u0432\u044b\u0448\u0435\u043b \u043d\u043e\u0432\u044b\u0439 \u0441\u0435\u0437\u043e\u043d \u0442\u0435\u043b\u0435\u0441\u0435\u0440\u0438\u0430\u043b\u0430 &#171;\u0422\u0440\u0438\u0433\u0433\u0435\u0440&#187; \u043e\u0442 \u043f\u0440\u043e\u0434\u044e\u0441\u0435\u0440\u0441\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0438 \u0421\u0440\u0435\u0434\u0430, \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0432 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u0430\u043a \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u0437\u043e\u043d\u044b \u043a\u043e\u043c\u0444\u043e\u0440\u0442\u0430, \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u043c\u0435\u0442\u043e\u0434 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0443\u0435\u0442 \u0433\u0435\u0440\u043e\u0439 \u041c\u0430\u043a\u0441\u0438\u043c\u0430 \u041c\u0430\u0442\u0432\u0435\u0435\u0432\u0430<\/figcaption><\/figure>\n<p>\u0422\u0440\u0438\u0433\u0433\u0435\u0440  \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435 \u0434\u0440\u0443\u0433\u043e\u0439  \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d. \u0422\u0435\u043a\u0443\u0449\u0438\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c, \u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c\u044b\u0439 \u0434\u0440\u0443\u0433\u043e\u0439  \u043f\u0430\u0439\u043f\u043b\u0430\u043d \u0440\u0435\u0431\u0435\u043d\u043a\u043e\u043c.<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0442\u0430\u043a\u043e\u0439<\/p>\n<pre><code class=\"yaml\">    # --------------- Prepare Test ---------------      prepare_test:       image: platform\/docker-images\/vault:1.8       variables:         CONTEXT_TEST: |           include:           # PRODUCT           - project: 'gitlabci\/integration-test'             ref: v2             file:               - 'product1\/etl\/.base_integration_test.yml'               - 'product1\/etl\/.base_integration_test_with_kafka.yml'           integration_test:             variables:               COVERAGE_SOURCE: \".\/src\"         INTEGRATION_TEST: |           $CONTEXT_TEST             extends: .base_integration_test         INTEGRATION_TEST_WITH_KAFKA: |           $CONTEXT_TEST             extends: .base_integration_test_with_kafka      stage: prepare_test       script:         - export CICD_KAFKA_HOST=$(cat test\/fixtures.py | grep KAFKA_HOST)         - >           if [ \"$CICD_KAFKA_HOST\" != \"\" ]; then             export CICD_KAFKA_HOST=\"true\"             echo \"$INTEGRATION_TEST_WITH_KAFKA\" >> test.yml           else             export CICD_KAFKA_HOST=\"false\"             echo \"$INTEGRATION_TEST\" >> test.yml           fi         - env | sort -f       artifacts:         paths:           - test.yml         expire_in: 7200 seconds      # --------------- Integration test ---------------      integration_test:       stage: test       trigger:         include:           - artifact: test.yml             job: prepare_test         strategy: depend<\/code><\/pre>\n<p>\u0412 \u0442\u0430\u043a\u043e\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043b\u0441\u044f \u0432  \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d: \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0438\u043d\u0438\u0446\u0438\u0438\u0440\u043e\u0432\u0430\u043b \u0437\u0430\u043f\u0443\u0441\u043a  \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430-\u0440\u0435\u0431\u0435\u043d\u043a\u0430<\/p>\n<figure class=\"full-width\"><figcaption>Gitlab CI: Pipeline \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0435\u0441\u0442\u044c pipeline \u0440\u0435\u0431\u0435\u043d\u043e\u043a<\/figcaption><\/figure>\n<p>\u0422\u0430\u043a\u0438\u0435  \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043f\u043e\u044f\u0432\u0438\u043b\u043e\u0441\u044c smart \u043d\u0430\u0447\u0430\u043b\u043e: \u043e\u043d \u0443\u043c\u0435\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439  \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0438 \u0432 job \u0441 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u043c \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u043e\u0442  \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c: \u043b\u0438\u0431\u043e \u0441 \u043a\u0430\u0444\u043a\u0430 \u043b\u0438\u0431\u043e \u0431\u0435\u0437. \u041d\u0430\u0447\u0430\u043b\u043e \u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043e, \u041d\u041e  \u0432\u043e\u0437\u043d\u0438\u043a\u043b\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u21162: \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f pipeline \u0440\u0435\u0431\u0435\u043d\u043a\u0430 &#8212;  \u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 coverage \u043e\u0442\u0447\u0435\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0435 \u043c\u0443\u043b\u044c\u0442\u0438\u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430\u0445 \u043c\u044b \u0434\u0430\u043b\u0435\u0435  \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0432 job c <strong>SonarQube<\/strong>. \u0420\u0435\u0448\u0438\u0442\u044c  \u0437\u0430\u0434\u0430\u0447\u0443 \u043f\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u043c\u0435\u0436\u0434\u0443 job artifact \u0432 \u0432\u0438\u0434\u0435 \u0444\u0430\u0439\u043b\u043e\u0432 \u043a\u0430\u043a \u0440\u0430\u043d\u044c\u0448\u0435 \u0431\u044b\u043b\u043e  \u043d\u0435\u043b\u044c\u0437\u044f, \u0432\u0435\u0440\u043d\u0443\u0442\u044c artifact \u0438\u0437 child \u0432 parent \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e.<\/p>\n<p>\u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0435  \u0440\u0435\u0448\u0435\u043d\u0438\u0435 &#8212; \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c upload artifact \u0432 \u043d\u0430\u0448 aftifactory \u0438 \u0432 job c  SonarQube \u043f\u0440\u043e\u0441\u0442\u043e \u0435\u0433\u043e \u0441\u043a\u0430\u0447\u0430\u0442\u044c. \u041d\u043e \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u043d\u0430\u0439\u0442\u0438 \u0431\u043e\u043b\u0435\u0435 \u0438\u0437\u044f\u0449\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431,  \u0447\u0442\u043e\u0431\u044b \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043e\u0431\u0440\u0430\u0449\u0435\u043d\u0438\u044f \u043a Artifactory. \u0418 \u0441\u043f\u043e\u0441\u043e\u0431 \u0431\u044b\u043b  \u043d\u0430\u0439\u0434\u0435\u043d: <strong>Gitlab CI API<\/strong><\/p>\n<h3>Gitlab CI API: download child artifacts<\/h3>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u043c\u0435\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0442\u044c\u0441\u044f \u043a Gitlab CI API \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e  \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0430\u0432\u0430 \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c  token. \u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f API \u0441\u043a\u0430\u0447\u0430\u0442\u044c artifact \u0438\u0437 pipeline  \u0440\u0435\u0431\u0435\u043d\u043a\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0432\u044b\u044f\u0441\u043d\u0438\u0442\u044c \u0435\u0433\u043e <strong>CI_JOB_ID<\/strong>.<\/p>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/api\/job_artifacts.html\" rel=\"noopener noreferrer nofollow\">GET \/projects\/:id\/jobs\/:job_id\/artifacts <\/a><\/p>\n<p>\u041a\u0430\u043a \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0438\u0437 pipeline \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044f?<\/p>\n<p>&#8212; \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c ID pipeline \u0440\u0435\u0431\u0435\u043d\u043a\u0430<\/p>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/api\/jobs.html\" rel=\"noopener noreferrer nofollow\">GET \/projects\/:id\/pipelines\/:pipeline_id\/bridges<\/a><\/p>\n<p>&#8212; \u043f\u043e id pipeline \u0440\u0435\u0431\u0435\u043d\u043a\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c id job<\/p>\n<p><a href=\"https:\/\/docs.gitlab.com\/ee\/api\/jobs.html\" rel=\"noopener noreferrer nofollow\">GET \/projects\/:id\/pipelines\/:pipeline_id\/jobs<\/a><\/p>\n<p>&#8212; \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0443\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u043c <a href=\"https:\/\/docs.gitlab.com\/ee\/api\/job_artifacts.html\" rel=\"noopener noreferrer nofollow\">\/projects\/:id\/jobs\/:job_id\/artifacts <\/a><\/p>\n<p>\u0418\u0442\u043e\u0433\u043e\u0432\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f job \u043f\u043e \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044e artifacts \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c  \u0442\u0430\u043a: \u0432 \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0433\u0440\u0443\u043f\u043f\u044b \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u043a\u0443\u0434\u0430 \u0432\u0445\u043e\u0434\u0438\u0442 \u0438 \u043d\u0430\u0448 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439  \u043f\u043e\u043b\u043e\u0436\u0438\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 token &#8212; <strong>GITLAB_USER_TOKEN<\/strong> \u0438 \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u043e\u0440\u0430 json \u043e\u0442\u0432\u0435\u0442\u0430 \u043e\u0442  Gitlab API \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 jq<\/p>\n<pre><code class=\"yaml\">    get_cicd_artifact:       image: platform\/docker-images\/ansible:2.9.24-9       stage: get_cicd_artifact       script:         - >           export CI_CHILD_PIPELINE_ID=$(curl --header \"PRIVATE-TOKEN: $GITLAB_USER_TOKEN\" \"$CI_API_V4_URL\/projects\/$CI_PROJECT_ID\/pipelines\/$CI_PIPELINE_ID\/bridges\" | jq \".[].downstream_pipeline.id\")         - echo $CI_CHILD_PIPELINE_ID         - >           export CI_CHILD_JOB_ID=$(curl --header \"PRIVATE-TOKEN: $GITLAB_USER_TOKEN\" \"$CI_API_V4_URL\/projects\/$CI_PROJECT_ID\/pipelines\/$CI_CHILD_PIPELINE_ID\/jobs\" | jq '.[].id')         - echo $CI_CHILD_JOB_ID         - 'curl --output artifacts.zip --header \"PRIVATE-TOKEN: $GITLAB_USER_TOKEN\" \"$CI_API_V4_URL\/projects\/$CI_PROJECT_ID\/jobs\/$CI_CHILD_JOB_ID\/artifacts\"'         - unzip artifacts.zip         - ls -las coverage-reports         - rm -rf artifacts.tar       dependencies:         - integration_test       artifacts:         paths:           - coverage-reports\/<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c Multi-project \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u0438\u043c\u0445\u043e \u0441\u043e &#171;smart&#187; \u0444\u0438\u0447\u043e\u0439<\/p>\n<figure class=\"full-width\"><figcaption>Gitlab CI Multi-project pipelines<\/figcaption><\/figure>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <\/p>\n<div class=\"tm-article-poll\">\n<div class=\"tm-notice tm-article-poll__notice tm-notice_positive\"><!----> <\/p>\n<div class=\"tm-notice__inner\"><!----> <\/p>\n<div class=\"tm-notice__content\"><span>\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a rel=\"nofollow\" href=\"\/kek\/v1\/auth\/habrahabr\/?back=\/ru\/post\/646587\/&#038;hl=ru\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/span><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__header\">\u041a\u0430\u043a\u0438\u0435 CI\/CD \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0412\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435?<\/div>\n<div class=\"tm-article-poll__answers\">\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             27.27%           <\/span> <span class=\"tm-article-poll__answer-label\">Jenkins<\/span> <span class=\"tm-article-poll__answer-votes\">             6           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:27.27%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent tm-article-poll__answer-percent_winning\">             86.36%           <\/span> <span class=\"tm-article-poll__answer-label\">Gitlab CI<\/span> <span class=\"tm-article-poll__answer-votes\">             19           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress tm-article-poll__answer-progress_winning\" style=\"width:86.36%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             22.73%           <\/span> <span class=\"tm-article-poll__answer-label\">TeamCity<\/span> <span class=\"tm-article-poll__answer-votes\">             5           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:22.73%;\"><\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__answer\">\n<div class=\"tm-article-poll__answer-data\"><span class=\"tm-article-poll__answer-percent\">             0%           <\/span> <span class=\"tm-article-poll__answer-label\">Bamboo CI<\/span> <span class=\"tm-article-poll__answer-votes\">             0           <\/span><\/div>\n<div class=\"tm-article-poll__answer-bar\">\n<div class=\"tm-article-poll__answer-progress\" style=\"width:0%;\"><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"tm-article-poll__stats\">        \u041f\u0440\u043e\u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b\u0438 22 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.           \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u043b\u0438\u0441\u044c 2 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f.      <\/div>\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\/646587\/\"> https:\/\/habr.com\/ru\/post\/646587\/<\/a><br \/><\/br><\/br><\/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-328282","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328282","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=328282"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/328282\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=328282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=328282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=328282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}