{"id":351908,"date":"2024-05-20T21:58:17","date_gmt":"2024-05-20T21:58:17","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=351908"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=351908","title":{"rendered":"<span>\u041f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c Android \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Gitlab CI<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u042f \u0414\u0430\u0448\u0430, Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043e\u043d\u043b\u0430\u0439\u043d \u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440\u0430 PREMIER. \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0430, \u043a\u0430\u043a \u043c\u044b <a href=\"https:\/\/habr.com\/ru\/company\/gazprommedia\/blog\/706222\/\"><u>\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0441\u0431\u043e\u0440\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Gitlab CI<\/u><\/a>. \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u043c\u0430\u0440\u043a\u0435\u0442\u044b \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0431\u0438\u043b\u0434 \u0438 \u0443\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u044f\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435!\u00a0<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u043a\u0430\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 Google Play, Huawei App Gallery \u0438 Firebase \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440\u0430 PREMIER. \u0422\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0443 \u0432 Nexus.<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/07e\/765\/571\/07e765571ead2c3e7662433319387128.png\" width=\"494\" height=\"494\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/07e\/765\/571\/07e765571ead2c3e7662433319387128.png\"\/><\/figure>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 stage \u2014 deploy \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 build:<\/p>\n<pre><code>stages:   - build   - deploy<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u044f\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u043d\u043e.\u00a0<\/p>\n<p>\u041a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b\u0430 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u0445 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043e\u043a \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b .gitlab-ci-deploy.yml \u0438 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0434\u0436\u043e\u0431\u044b \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<pre><code>stage: deploy  when: on_success  needs:     - job: JOB_NAME       artifacts: true<\/code><\/pre>\n<p>\u0412 when \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0434\u0436\u043e\u0431\u044b. \u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0434\u0436\u043e\u0431\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c on_success. \u0415\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c manual.<\/p>\n<p>\u0412 \u043f\u043e\u043b\u0435 needs.job \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u0436\u043e\u0431\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 atrifacts:true, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0435\u0439.<\/p>\n<h2>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Google Play<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 Google play \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/github.com\/Triple-T\/gradle-play-publisher\"><u>Gradle Play Publisher<\/u><\/a>. \u041c\u044b \u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u044f \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0435\u0437\u0434\u0435 \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Gradle \u043f\u043b\u0430\u0433\u0438\u043d\u044b.<\/p>\n<pre><code>Google_PublishAlpha:   stage: deploy   when: on_success   variables:     GOOGLE_PLAY_TRACK: \"alpha\"   needs:     - job: _Google_ReleaseBundle       artifacts: true   script:     - .\/gradlew -Pbuildnum=\"${CI_JOB_ID}\" --console=plain :${APPLICATION}:publishGoogleReleaseBundle --track ${GOOGLE_PLAY_TRACK} --artifact-dir ${ARTIFACT_PATH}<\/code><\/pre>\n<p>\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435.<\/p>\n<pre><code> variables:     GOOGLE_PLAY_TRACK: \"alpha\"<\/code><\/pre>\n<p>\u041c\u044b \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e alpha \u0432\u0435\u0440\u0441\u0438\u0438, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e GOOGLE_PLAY_TRACK, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438 beta, internal, \u0438 production.<\/p>\n<p>ARTIFACT_PATH \u2014 \u043f\u0443\u0442\u044c \u043a \u0441\u0431\u043e\u0440\u043a\u0435 \u0443 \u043d\u0430\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: sources\/app\/build\/outputs\/bundle\/googleRelease\/;<\/p>\n<p>APPLICATION \u2014 app \u0438\u043b\u0438 tv, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 2 \u043c\u043e\u0434\u0443\u043b\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c;<\/p>\n<h3>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Huawei App Gallery<\/h3>\n<p>\u0414\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 draft \u0441\u0431\u043e\u0440\u043a\u0438 \u0432 Huawei App Gallery \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/github.com\/cianru\/huawei-publish-gradle-plugin\"><u>Huawei App Gallery Publishing<\/u><\/a> \u0438 <a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/development\/AppGallery-connect-Guides\/agc-get-started-android-0000001058210705\"><u>App Gallery Connect<\/u><\/a>.<\/p>\n<p>\u041f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code>Huawei_PublishDraft:   stage: deploy   when: on_success   needs:     - job: _Huawei_ProdBundle       artifacts: true   script:     - AAB_ARTIFACT_PATH=$(find $ARTIFACT_PATH -name \"*.aab\")     - .\/gradlew -Pbuildnum=\"$CI_JOB_ID\" --console=plain :${APPLICATION}:publishHuaweiAppGalleryHuaweiRelease --buildFile=${AAB_ARTIFACT_PATH}<\/code><\/pre>\n<p>ARTIFACT_PATH \u2014 sources\/app\/build\/outputs\/bundle\/huaweiRelease<\/p>\n<p>APPLICATION \u2014 app \u0438\u043b\u0438 tv<\/p>\n<p>\u0412 build.gradle \u043c\u044b \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430:<\/p>\n<pre><code>apply plugin: 'ru.cian.huawei-publish-gradle-plugin' \u2026 huaweiPublish {     instances {         huaweiRelease {             credentialsPath = \"$PATH_HUAWEI_CRED\"             deployType = \"draft\"             buildFormat = \"aab\"         }     } }<\/code><\/pre>\n<p>PATH_HUAWEI_CRED \u0432\u0435\u0434\u0435\u0442 \u043a json c client_id \u0438 client_secret.<\/p>\n<h3>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Nexus<\/h3>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0441\u0431\u043e\u0440\u043e\u043a \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Nexus \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432. \u0421\u043a\u0440\u0438\u043f\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>_Google_PublishNexus:   stage: build   when: manual   needs:     - job: _Google_ReleaseApk       artifacts: true   script:     - ARTIFACT_NEXUS_NAME=${CI_COMMIT_BRANCH#*\/}     - curl -v -u $NEXUS_LOGIN:$NEXUS_PASSWORD --upload-file $ARTIFACT_PATH $NEXUS_LINK<\/code><\/pre>\n<p>NEXUS_LINK \u2014 \u043f\u0443\u0442\u044c, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u043d\u0430\u0448\u0430 \u0441\u0431\u043e\u0440\u043a\u0430;<\/p>\n<p>CI_COMMIT_BRANCH \u2014 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0442\u043a\u0438, \u043f\u0440\u043e \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/variables\/predefined_variables.html\"><u>\u0442\u0443\u0442<\/u><\/a>;<\/p>\n<p>NEXUS_LOGIN \u0438 NEXUS_PASSWORD \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 Nexus.\u00a0<\/p>\n<h3>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Firebase App Distribution<\/h3>\n<p>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 Firebase \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/firebase.google.com\/docs\/app-distribution\/android\/distribute-gradle?apptype=aab\"><u>App Distribution Gradle plugin<\/u><\/a>:<\/p>\n<pre><code>Google_PublishFirebase:   stage: deploy   when: manual   needs:     - job: _Google_DebugBundle       artifacts: true   before_script:     - export GRADLE_USER_HOME=$(pwd)\/.gradle   script:     - .\/gradlew --console=plain :app:appDistributionUploadGoogleDebug       -Pci       -Pbuildnum=\"$CI_JOB_ID\"       -PappDistribution-artifactType=\"AAB\"       -PappDistribution-groups=\"premier_qa\"       -PappDistribution-testers=\"$GITLAB_USER_EMAIL\"       -PappDistribution-releaseNotes=\"for $GITLAB_USER_NAME, job=$CI_JOB_URL, pipeline=$CI_PIPELINE_URL\"     artifacts:     name: \"$CI_JOB_STAGE-$CI_COMMIT_REF_NAME\"     paths:       - \"$PATH_HANDHELD_BUNDLE_PREPROD_DEBUG\"     expire_in: 1 week <\/code><\/pre>\n<p>CI_JOB_ID \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u0436\u043e\u0431\u044b;<\/p>\n<p>GITLAB_USER_EMAIL \u2014 \u043f\u043e\u0447\u0442\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e, \u043a\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: &#171;<a href=\"mailto:nikita@example.com\">nikita@example.com<\/a>, <a href=\"mailto:stas@example.com\">stas@example.com<\/a>, <a href=\"mailto:gena@example.com\">gena@example.com<\/a>&#171;;<\/p>\n<p>GITLAB_USER_NAME \u2014 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0438\u043a\u043d\u0435\u0439\u043c\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0433\u0438\u0442\u043b\u0430\u0431;<\/p>\n<p>CI_JOB_URL \u2014 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0434\u0436\u043e\u0431\u044b;<\/p>\n<p>CI_PIPELINE_URL \u2014 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d. <\/p>\n<p>\u0414\u043b\u044f \u0420\u0424 \u043f\u043b\u043e\u0445\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0442.\u043a. \u0435\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0442\u044b \u043d\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 apk \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 App Distribution, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 VPN.\u00a0<\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/9c1\/75a\/b1c\/9c175ab1c33c02c9ec8e7097b02db210.png\" width=\"640\" height=\"640\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/9c1\/75a\/b1c\/9c175ab1c33c02c9ec8e7097b02db210.png\"\/><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0432\u0441\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u044b, \u043d\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0438 \u0432 \u043c\u0430\u0440\u043a\u0435\u0442\u044b\/\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u2014 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043e\u0434\u043d\u0443 \u043a\u043d\u043e\u043f\u043e\u0447\u043a\u0443, \u0438 \u0437\u0430 \u043d\u0430\u0441 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442 Gitlab CI.\u00a0<\/p>\n<p>Gitlab CI \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0432\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Nexus \u0438 Firebase, \u043d\u043e Firebase \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u0432\u0441\u0435\u043c. <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432\u0430\u043c \u043f\u0440\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 RuStore \ud83d\ude42 <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/753984\/\"> https:\/\/habr.com\/ru\/articles\/753984\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u042f \u0414\u0430\u0448\u0430, Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432 \u043a\u043e\u043c\u0430\u043d\u0434\u0435 \u043e\u043d\u043b\u0430\u0439\u043d \u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440\u0430 PREMIER. \u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0430, \u043a\u0430\u043a \u043c\u044b <a href=\"https:\/\/habr.com\/ru\/company\/gazprommedia\/blog\/706222\/\"><u>\u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0441\u0431\u043e\u0440\u043a\u0443 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e Gitlab CI<\/u><\/a>. \u0414\u0430\u043b\u044c\u0448\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 \u043c\u0430\u0440\u043a\u0435\u0442\u044b \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0435\u0433\u043e \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u0430 \u0437\u0430\u0442\u0435\u043c \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0435 \u0445\u043e\u0447\u0435\u0442\u0441\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0442\u044c \u0431\u0438\u043b\u0434 \u0438 \u0443\u0445\u043e\u0434\u0438\u0442\u044c \u0432 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043e\u043d\u0441\u043e\u043b\u044f\u043c\u0438, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u0435\u0448\u0435\u043d\u0438\u0435!\u00a0<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c\u0441\u044f, \u043a\u0430\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0432 Google Play, Huawei App Gallery \u0438 Firebase \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u0438\u043d\u043e\u0442\u0435\u0430\u0442\u0440\u0430 PREMIER. \u0422\u0430\u043a\u0436\u0435 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u043a\u0430\u043a \u043c\u044b \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0443 \u0432 Nexus.<\/p>\n<figure class=\"\"><\/figure>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 stage \u2014 deploy \u0438 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435 build:<\/p>\n<pre><code>stages:   - build   - deploy<\/code><\/pre>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043a\u0440\u0438\u043f\u0442\u044b \u0437\u0430\u043f\u0443\u0441\u0442\u044f\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u043d\u043e.\u00a0<\/p>\n<p>\u041a\u0430\u043a \u044f \u043f\u0438\u0441\u0430\u043b\u0430 \u0432 \u043f\u0440\u043e\u0448\u043b\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u043b\u0443\u0447\u0448\u0435 \u0432\u044b\u0434\u0435\u043b\u0438\u0442\u044c \u0433\u0440\u0443\u043f\u043f\u044b \u0441\u043a\u0440\u0438\u043f\u0442\u043e\u0432 \u0438 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0438\u0445 \u043d\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u0444\u0430\u0439\u043b\u044b. \u0414\u043b\u044f \u0441\u0431\u043e\u0440\u043e\u043a \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0444\u0430\u0439\u043b .gitlab-ci-deploy.yml \u0438 \u043f\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 \u043a\u0430\u0436\u0434\u043e\u0439 \u0434\u0436\u043e\u0431\u044b \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438:<\/p>\n<pre><code>stage: deploy  when: on_success  needs:     - job: JOB_NAME       artifacts: true<\/code><\/pre>\n<p>\u0412 when \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0434\u0436\u043e\u0431\u044b. \u0414\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0443\u0441\u043f\u0435\u0448\u043d\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0434\u0436\u043e\u0431\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c on_success. \u0415\u0441\u043b\u0438 \u043c\u044b \u0445\u043e\u0442\u0438\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0442\u043e \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c manual.<\/p>\n<p>\u0412 \u043f\u043e\u043b\u0435 needs.job \u043c\u044b \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0434\u0436\u043e\u0431\u044b \u0441\u0431\u043e\u0440\u043a\u0438 \u0438 atrifacts:true, \u0447\u0442\u043e\u0431\u044b \u043f\u0435\u0440\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0435\u0439.<\/p>\n<h2>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Google Play<\/h2>\n<p>\u0414\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 Google play \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/github.com\/Triple-T\/gradle-play-publisher\"><u>Gradle Play Publisher<\/u><\/a>. \u041c\u044b \u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0435\u0434\u0438\u043d\u043e\u0433\u043e \u0441\u0442\u0438\u043b\u044f \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0435\u0437\u0434\u0435 \u0434\u043b\u044f \u0434\u0435\u043f\u043b\u043e\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Gradle \u043f\u043b\u0430\u0433\u0438\u043d\u044b.<\/p>\n<pre><code>Google_PublishAlpha:   stage: deploy   when: on_success   variables:     GOOGLE_PLAY_TRACK: \"alpha\"   needs:     - job: _Google_ReleaseBundle       artifacts: true   script:     - .\/gradlew -Pbuildnum=\"${CI_JOB_ID}\" --console=plain :${APPLICATION}:publishGoogleReleaseBundle --track ${GOOGLE_PLAY_TRACK} --artifact-dir ${ARTIFACT_PATH}<\/code><\/pre>\n<p>\u0412\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u043f\u0440\u0438 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0435.<\/p>\n<pre><code> variables:     GOOGLE_PLAY_TRACK: \"alpha\"<\/code><\/pre>\n<p>\u041c\u044b \u043f\u043e\u043a\u0430 \u0447\u0442\u043e \u043f\u0443\u0431\u043b\u0438\u043a\u0443\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e alpha \u0432\u0435\u0440\u0441\u0438\u0438, \u0447\u0442\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e GOOGLE_PLAY_TRACK, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438 beta, internal, \u0438 production.<\/p>\n<p>ARTIFACT_PATH \u2014 \u043f\u0443\u0442\u044c \u043a \u0441\u0431\u043e\u0440\u043a\u0435 \u0443 \u043d\u0430\u0441 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c: sources\/app\/build\/outputs\/bundle\/googleRelease\/;<\/p>\n<p>APPLICATION \u2014 app \u0438\u043b\u0438 tv, \u0442\u0430\u043a \u043a\u0430\u043a \u0443 \u043d\u0430\u0441 2 \u043c\u043e\u0434\u0443\u043b\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c;<\/p>\n<h3>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Huawei App Gallery<\/h3>\n<p>\u0414\u043b\u044f \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 draft \u0441\u0431\u043e\u0440\u043a\u0438 \u0432 Huawei App Gallery \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <a href=\"https:\/\/github.com\/cianru\/huawei-publish-gradle-plugin\"><u>Huawei App Gallery Publishing<\/u><\/a> \u0438 <a href=\"https:\/\/developer.huawei.com\/consumer\/en\/doc\/development\/AppGallery-connect-Guides\/agc-get-started-android-0000001058210705\"><u>App Gallery Connect<\/u><\/a>.<\/p>\n<p>\u041f\u0430\u0439\u043f\u043b\u0430\u0439\u043d \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code>Huawei_PublishDraft:   stage: deploy   when: on_success   needs:     - job: _Huawei_ProdBundle       artifacts: true   script:     - AAB_ARTIFACT_PATH=$(find $ARTIFACT_PATH -name \"*.aab\")     - .\/gradlew -Pbuildnum=\"$CI_JOB_ID\" --console=plain :${APPLICATION}:publishHuaweiAppGalleryHuaweiRelease --buildFile=${AAB_ARTIFACT_PATH}<\/code><\/pre>\n<p>ARTIFACT_PATH \u2014 sources\/app\/build\/outputs\/bundle\/huaweiRelease<\/p>\n<p>APPLICATION \u2014 app \u0438\u043b\u0438 tv<\/p>\n<p>\u0412 build.gradle \u043c\u044b \u043f\u0440\u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043f\u043b\u0430\u0433\u0438\u043d\u0430:<\/p>\n<pre><code>apply plugin: 'ru.cian.huawei-publish-gradle-plugin' \u2026 huaweiPublish {     instances {         huaweiRelease {             credentialsPath = \"$PATH_HUAWEI_CRED\"             deployType = \"draft\"             buildFormat = \"aab\"         }     } }<\/code><\/pre>\n<p>PATH_HUAWEI_CRED \u0432\u0435\u0434\u0435\u0442 \u043a json c client_id \u0438 client_secret.<\/p>\n<h3>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Nexus<\/h3>\n<p>\u0422\u0430\u043a\u0436\u0435 \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0441\u0431\u043e\u0440\u043e\u043a \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Nexus \u2014 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0445\u0440\u0430\u043d\u0435\u043d\u0438\u044f \u0430\u0440\u0442\u0435\u0444\u0430\u043a\u0442\u043e\u0432. \u0421\u043a\u0440\u0438\u043f\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0441\u0431\u043e\u0440\u043a\u0438 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code>_Google_PublishNexus:   stage: build   when: manual   needs:     - job: _Google_ReleaseApk       artifacts: true   script:     - ARTIFACT_NEXUS_NAME=${CI_COMMIT_BRANCH#*\/}     - curl -v -u $NEXUS_LOGIN:$NEXUS_PASSWORD --upload-file $ARTIFACT_PATH $NEXUS_LINK<\/code><\/pre>\n<p>NEXUS_LINK \u2014 \u043f\u0443\u0442\u044c, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u043b\u0435\u0436\u0430\u0442\u044c \u043d\u0430\u0448\u0430 \u0441\u0431\u043e\u0440\u043a\u0430;<\/p>\n<p>CI_COMMIT_BRANCH \u2014 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0442\u043a\u0438, \u043f\u0440\u043e \u0434\u0440\u0443\u0433\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/docs.gitlab.com\/ee\/ci\/variables\/predefined_variables.html\"><u>\u0442\u0443\u0442<\/u><\/a>;<\/p>\n<p>NEXUS_LOGIN \u0438 NEXUS_PASSWORD \u043d\u0443\u0436\u043d\u044b \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 Nexus.\u00a0<\/p>\n<h3>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044f \u0432 Firebase App Distribution<\/h3>\n<p>\u041f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u0447\u0435\u0440\u0435\u0437 Firebase \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <a href=\"https:\/\/firebase.google.com\/docs\/app-distribution\/android\/distribute-gradle?apptype=aab\"><u>App Distribution Gradle plugin<\/u><\/a>:<\/p>\n<pre><code>Google_PublishFirebase:   stage: deploy   when: manual   needs:     - job: _Google_DebugBundle       artifacts: true   before_script:     - export GRADLE_USER_HOME=$(pwd)\/.gradle   script:     - .\/gradlew --console=plain :app:appDistributionUploadGoogleDebug       -Pci       -Pbuildnum=\"$CI_JOB_ID\"       -PappDistribution-artifactType=\"AAB\"       -PappDistribution-groups=\"premier_qa\"       -PappDistribution-testers=\"$GITLAB_USER_EMAIL\"       -PappDistribution-releaseNotes=\"for $GITLAB_USER_NAME, job=$CI_JOB_URL, pipeline=$CI_PIPELINE_URL\"     artifacts:     name: \"$CI_JOB_STAGE-$CI_COMMIT_REF_NAME\"     paths:       - \"$PATH_HANDHELD_BUNDLE_PREPROD_DEBUG\"     expire_in: 1 week <\/code><\/pre>\n<p>CI_JOB_ID \u2014 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 \u0434\u0436\u043e\u0431\u044b;<\/p>\n<p>GITLAB_USER_EMAIL \u2014 \u043f\u043e\u0447\u0442\u044b \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432 \u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043f\u044f\u0442\u0443\u044e, \u043a\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: &#171;<a href=\"mailto:nikita@example.com\">nikita@example.com<\/a>, <a href=\"mailto:stas@example.com\">stas@example.com<\/a>, <a href=\"mailto:gena@example.com\">gena@example.com<\/a>&#171;;<\/p>\n<p>GITLAB_USER_NAME \u2014 \u043f\u0440\u0435\u0434\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0438\u043a\u043d\u0435\u0439\u043c\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0433\u0438\u0442\u043b\u0430\u0431;<\/p>\n<p>CI_JOB_URL \u2014 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0434\u0436\u043e\u0431\u044b;<\/p>\n<p>CI_PIPELINE_URL \u2014 \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d. <\/p>\n<p>\u0414\u043b\u044f \u0420\u0424 \u043f\u043b\u043e\u0445\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442, \u0442.\u043a. \u0435\u0441\u0442\u044c \u0437\u0430\u043f\u0440\u0435\u0442\u044b \u043d\u0430 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 apk \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u0437 App Distribution, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0441 VPN.\u00a0<\/p>\n<h2>\u0418\u0442\u043e\u0433<\/h2>\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043c\u044b \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u043b\u0438 \u0432\u0441\u0435 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u044b, \u043d\u0430\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u0441\u0431\u043e\u0440\u043a\u0438 \u0432 \u043c\u0430\u0440\u043a\u0435\u0442\u044b\/\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u2014 \u043d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u043e\u0434\u043d\u0443 \u043a\u043d\u043e\u043f\u043e\u0447\u043a\u0443, \u0438 \u0437\u0430 \u043d\u0430\u0441 \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0435\u0442 Gitlab CI.\u00a0<\/p>\n<p>Gitlab CI \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u0432\u043e\u0435 \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0435, \u043d\u043e \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u044d\u0442\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e, \u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c Nexus \u0438 Firebase, \u043d\u043e Firebase \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u043d\u0435 \u0432\u0441\u0435\u043c. <\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432\u0430\u043c \u043f\u0440\u043e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u044e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0439 \u0432 RuStore \ud83d\ude42 <\/p>\n<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/753984\/\"> https:\/\/habr.com\/ru\/articles\/753984\/<\/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-351908","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/351908","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=351908"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/351908\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=351908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=351908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=351908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}