{"id":312946,"date":"2020-11-11T15:00:40","date_gmt":"2020-11-11T15:00:40","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=312946"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=312946","title":{"rendered":"\u0418\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u044f CI\/CD \u0434\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0441\u0440\u0435\u0434 \u0441 Jenkins \u0438 Fastlane. \u0427\u0430\u0441\u0442\u044c 2"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<blockquote>\n<p>\u0412 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430&nbsp;<a href=\"https:\/\/otus.pw\/VZqe\/\">&#171;iOS Developer. Basic&#187;<\/a>&nbsp;\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0438\u044e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/otus.pw\/VZqe\/\">\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0434\u0435\u043c\u043e-\u0443\u0440\u043e\u043a \u043f\u043e \u0442\u0435\u043c\u0435: &#171;Result Type&#187;<\/a>.<\/p>\n<\/blockquote>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/315\/8a4\/b79\/3158a4b794321d8642b01167d4d4068b\" width=\"780\" height=\"439\"><figcaption><\/figcaption><\/figure>\n<hr>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/526394\/\"><em>\u0427\u0438\u0442\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c<\/em><\/a><\/p>\n<hr>\n<p><strong>5. \u0421\u0431\u043e\u0440\u043a\u0430 \u0431\u0438\u043b\u0434\u0430<\/strong><\/p>\n<pre><code class=\"java\">stage('Build') {         withEnv([\"FASTLANE_USER=fastlane_user_email_address\"]) {             withCredentials([                     string([                       credentialsId:'match_password_id',                        variable: 'MATCH_PASSWORD'                     ]),                     string([                       credentialsId: 'fastlane_password_id',                       variable: 'FASTLANE_PASSWORD']),                     ]) {                        sh 'bundle exec fastlane build'                     }         }   }<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Jenkins Pipeline <a href=\"http:\/\/jenkins.io\/doc\/pipeline\/steps\/workflow-basic-steps\/#withenv-set-environment-variables\"><u>withEnv<\/u><\/a> \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e <a href=\"https:\/\/docs.fastlane.tools\/best-practices\/continuous-integration\/#environment-variables-to-set\"><u>\u0437\u0434\u0435\u0441\u044c<\/u><\/a>, \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 Fastlane. \u0418\u0442\u0430\u043a, \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>FASTLANE_USER<\/code><em>. <\/em>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0435\u0449\u0435 \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b, MATCH_PASSWORD \u0438 FASTLANE_PASSWORD, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043d\u0438 \u043f\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 Jenkins \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 \u043c\u0435\u043d\u044e \u00abCredential\u00bb \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430 Jenkins \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 secret_text, \u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0432 credentialsId.<\/p>\n<p>\u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u043b\u0435\u0439\u043d \u0432\u043d\u0443\u0442\u0440\u0438 Fastfile, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0430\u043c\u044b\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u043b\u0435\u0439\u043d\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"java\">lane :build do      match(         git_branch: \"the_branch_of_the_repo_with_the_prov_profile\",          username: \"github_username\",          git_url: \"github_repo_with_prov_profiles\",          type: \"appstore\",          app_identifier: \"production_app_identifier\",          force: true)         version = get_version_number(                        xcodeproj: \"our_project.xcodeproj\",                         target: \"production_target\"                )      build_number = latest_testflight_build_number(                        version: version,                           app_identifier: \"production_app_identifier\",                        initial_build_number: 0                      )           increment_build_number({ build_number: build_number + 1 })      settings_to_override = {       :BUNDLE_IDENTIFIER =&gt; \"production_bundle_id\",       :PROVISIONING_PROFILE_SPECIFIER =&gt; \"production_prov_profile\",       :DEVELOPMENT_TEAM =&gt; \"team_id\"      }          export_options = {        iCloudContainerEnvironment: \"Production\",        provisioningProfiles: { \"production_bundle_id\": \"production_prov_profile\" }      }           gym(        clean: true,        scheme: \"production_scheme\",        configuration: \"production_configuration\",        xcargs: settings_to_override,        export_method: \"app-store\",        include_bitcode: true,        include_symbols: true,        export_options: export_options      )   end<\/code><\/pre>\n<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0435\u0433\u043e \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c.<\/p>\n<p>\u041c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u043a\u0448\u0435\u043d\u0430 Fastlane <a href=\"https:\/\/docs.fastlane.tools\/actions\/match\/\"><u>match<\/u><\/a>. Match \u043f\u043e \u0441\u0443\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u0442.\u0435. \u043e\u043d \u043f\u043e \u0441\u0443\u0442\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c match \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 Github-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0433\u0434\u0435 \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u0431\u044b \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b, \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c match \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043a\u043e\u0434\u0430, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u043a\u0448\u0435\u043d\u044b <a href=\"https:\/\/docs.fastlane.tools\/actions\/sigh\/\"><u>sigh<\/u><\/a> \u0438 <a href=\"https:\/\/docs.fastlane.tools\/actions\/cert\/\"><u>cert<\/u><\/a>.<\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u0427\u0442\u043e \u0431\u044b \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u0430\u043a \u044d\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u043c\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u043b\u0434\u0430 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0440\u0435\u043b\u0438\u0437\u0430, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0438\u043b\u0434\u0430 Xcode. \u0412\u0441\u0435 \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0431\u0438\u043b\u0434 \u0432 Testflight \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0440\u0435\u043b\u0438\u0437\u0430 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0441\u043b\u043e\u0432\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0432\u044b\u0448\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0431\u043e\u0440\u043a\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u0442.\u0435. \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u043b\u0438. plist, \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e. \u0412 \u043a\u043e\u0434\u0435, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435, \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 3 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0448\u0430\u0433\u0430:<\/p>\n<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/docs.fastlane.tools\/actions\/get_version_number\/%5D\"><u>get_version_number:<\/u><\/a> \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f&nbsp;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.fastlane.tools\/actions\/latest_testflight_build_number\/\"><u>latest_testflight_build_number:<\/u><\/a> \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u0431\u0438\u043b\u0434\u0430 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438, \u043a\u043e\u0442\u0440\u0443\u044e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.fastlane.tools\/actions\/increment_build_number\/\"><u>increment_<\/u>build_number:<\/a> \u0418\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 \u043d\u043e\u043c\u0435\u0440\u0430 \u0431\u0438\u043b\u0434\u0430 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u043c (\u0437\u0434\u0435\u0441\u044c \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443).<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u044d\u043a\u0448\u0435\u043d\u0430 <a href=\"https:\/\/docs.fastlane.tools\/actions\/gym\/\"><u>gym<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041e\u043d \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a configuration, scheme \u0438 xcargs, \u0433\u0434\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c <code>bundle_identifier<\/code><em>, <\/em><code>export_options<\/code> \u0438 \u0442. \u0434.<\/p>\n<\/p>\n<p><strong>6. \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432 Testflight<\/strong><\/p>\n<\/p>\n<pre><code class=\"go\">stage('Upload to TestFlight') {   withEnv([\"FASTLANE_USER=fastlane_user_email_address\"]) {     withCredentials([       string([            credentialsId: 'fastlane_password_id',             variable: 'FASTLANE_PASSWORD']),        ]) {          sh \"bundle exec fastlane upload_to_testflight\"        }   } }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u043d\u043e\u0432\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b, \u043a\u0430\u043a \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435, \u0438 \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u043b\u0435\u0439\u043d \u0432\u043d\u0443\u0442\u0440\u0438 Fastfile \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"go\">lane :upload_to_testflight do     pilot(       ipa: \".\/build\/our_project.ipa\",       skip_submission: true,       skip_waiting_for_build_processing: true,       app_identifier: \"production_app_identifier\"     ) end<\/code><\/pre>\n<\/p>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 Fastlane <a href=\"https:\/\/docs.fastlane.tools\/actions\/pilot\/\"><u>pilot<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u0444\u0430\u0439\u043b .ipa \u0432 Testflight. \u042d\u0442\u0438\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043b\u043e\u0433 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0444\u0430\u0439\u043b <code>.ipa<\/code> \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d, \u043d\u043e \u043d\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d \u0441\u0440\u0435\u0434\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432.<\/p>\n<\/p>\n<p><strong>7. \u041e\u0447\u0438\u0441\u0442\u043a\u0430&nbsp;<\/strong><\/p>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u043e\u0435: \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Jenkins <a href=\"https:\/\/www.jenkins.io\/doc\/pipeline\/steps\/ws-cleanup\/\"><u>cleanup<\/u><\/a>.<\/p>\n<pre><code class=\"java\">stage('Cleanup') {     cleanWs notFailBuild: true }<\/code><\/pre>\n<\/p>\n<p>\u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u043e\u0440\u043a\u0441\u043f\u0435\u0439\u0441 \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d.<\/p>\n<p>\u041f\u043e\u0434\u0432\u043e\u0434\u044f \u0438\u0442\u043e\u0433, \u0432\u043e\u0442 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>deploy()<\/code> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 <code>Deploy.script<\/code>.<\/p>\n<pre><code class=\"java\">def deploy() {      stage('Checkout') {         checkout scm     }      stage('Install dependencies') {        sh 'gem install bundler'        sh 'bundle update'        sh 'bundle exec pod repo update'        sh 'bundle exec pod install'     }      stage('Reset Simulators') {        sh 'bundle exec fastlane snapshot reset_simulators --force'     }      stage('Run Tests') {        sh 'bundle exec fastlane test'     }          stage('Build') {         withEnv([\"FASTLANE_USER=fastlane_user_email_address\"]) {             withCredentials([                  string([                       credentialsId:'match_password_id',                        variable: 'MATCH_PASSWORD'                  ]),                  string([                       credentialsId: 'fastlane_password_id',                       variable: 'FASTLANE_PASSWORD']),                  ]) {                       sh 'bundle exec fastlane build'                  }         }     }          stage('Upload to TestFlight') {         withEnv([\"FASTLANE_USER=fastlane_user_email_address\"]) {             withCredentials([                  string([                       credentialsId: 'fastlane_password_id',                        variable: 'FASTLANE_PASSWORD']),                   ]) {                       sh \"bundle exec fastlane upload_to_testflight\"                  }        }     }          stage('Cleanup') {         cleanWs notFailBuild: true     } }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 Fastfile \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code>fastlane_version \"2.75.0\"  default_platform :ios  lane :test do     scan(         clean: true,         devices: [\"iPhone X\"],         workspace: \"our_project.xcworkspace\",         scheme: \"production_scheme\",         code_coverage: true,         output_directory: \".\/test_output\",         output_types: \"html,junit\"     )     slather(         cobertura_xml: true,         proj: \"our_project.xcodeproj\",         workspace: \"our_project.xcworkspace\",         output_directory: \".\/test_output\",         scheme: \"production_scheme\",         jenkins: true,         ignore: [array_of_docs_to_ignore]     ) end  lane :build do      match(         git_branch: \"the_branch_of_the_repo_with_the_prov_profile\",          username: \"github_username\",          git_url: \"github_repo_with_prov_profiles\",          type: \"appstore\",          app_identifier: \"production_app_identifier\",          force: true)         version = get_version_number(                        xcodeproj: \"our_project.xcodeproj\",                         target: \"production_target\"                )      build_number = latest_testflight_build_number(                        version: version,                           app_identifier: \"production_app_identifier\",                        initial_build_number: 0                      )           increment_build_number({ build_number: build_number + 1 })           settings_to_override = {       :BUNDLE_IDENTIFIER =&gt; \"production_bundle_id\",       :PROVISIONING_PROFILE_SPECIFIER =&gt; \"production_prov_profile\",       :DEVELOPMENT_TEAM =&gt; \"team_id\"      }           export_options = {        iCloudContainerEnvironment: \"Production\",        provisioningProfiles: { \"production_bundle_id\": \"production_prov_profile\" }      }          gym(        clean: true,        scheme: \"production_scheme\",        configuration: \"production_configuration\",        xcargs: settings_to_override,        export_method: \"app-store\",        include_bitcode: true,        include_symbols: true,        export_options: export_options      ) end  lane :upload_to_testflight do     pilot(       ipa: \".\/build\/our_project.ipa\",       skip_submission: true,       skip_waiting_for_build_processing: true,       app_identifier: \"production_app_identifier\"     ) end<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>deploy()<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0432 \u0437\u0430\u0434\u0430\u0447\u0435 &#8212; <code>MyScript.groovy<\/code>, \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"java\">node(label: 'ios') {      def deploy;   def utils;    String RVM = \"ruby-2.5.0\"    ansiColor('xterm') {     withEnv([\"LANG=en_US.UTF-8\", \"LANGUAGE=en_US.UTF-8\", \"LC_ALL=en_US.UTF-8\"]) {                  deploy = load(\"jenkins\/Deploy.groovy\")         utils = load(\"jenkins\/utils.groovy\")          utils.withRvm(RVM) {           deploy.deploy()         }     }    } }<\/code><\/pre>\n<\/p>\n<p>\u041c\u044b \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 Deploy.groovy \u0438 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e deploy(), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0432\u0441\u044e \u0440\u0430\u0431\u043e\u0442\u0443. \u0417\u0434\u0435\u0441\u044c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 <a href=\"https:\/\/gist.github.com\/elenipapanik\/f01324272ac9b14dc4ae4d29c67ce0e1\"><u>utils.groovy<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043d\u0430\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c Jenkins.job. <a href=\"https:\/\/plugins.jenkins.io\/ansicolor\/\"><u>AnsiColor<\/u><\/a> \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u043f\u043b\u0430\u0433\u0438\u043d Jenkins \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u043a\u0440\u0430\u0441\u0438\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u044d\u0442\u0430\u043f\u043e\u0432 \u0432 \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0435 \u0441\u0431\u043e\u0440\u043a\u0438. \u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u043c\u044b \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0432\u043d\u0443\u0442\u0440\u0438<\/p>\n<pre><code class=\"java\">node(label: 'ios')<\/code><\/pre>\n<p>\u0412 <a href=\"https:\/\/www.jenkins.io\/doc\/book\/pipeline\/jenkinsfile\/\"><u>Scripted Pipeline<\/u><\/a> \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 node \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0430\u0436\u043d\u044b\u043c \u043f\u0435\u0440\u0432\u044b\u043c \u0448\u0430\u0433\u043e\u043c, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044f \u0438 \u0440\u0430\u0431\u043e\u0447\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043f\u0430\u0439\u043f\u043b\u0430\u0439\u043d\u0430.<\/p>\n<p>\u0418 \u0432\u043e\u0442 \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0437\u0430\u0434\u0430\u0447\u0443 Jenkins, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0435\u0442\u043a\u0438 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044f \u0432\u0435\u0442\u043a\u0443 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0432 Jenkins.<\/p>\n<h2>\u0427\u0430\u0441\u0442\u044c 3<\/h2>\n<p>\u0412 <a href=\"https:\/\/medium.com\/@elenipapanikolo\/integrating-ci-cd-with-jenkins-fastlane-for-multiple-environments-part-2-2-7f1df780bf7c\"><em><u>\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438<\/u><\/em><\/a> \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c Jenkins , \u0447\u0442\u043e\u0431\u044b \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u044f\u0442\u044c \u043d\u0430\u0448\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0439 Xcode.<\/p>\n<hr>\n<p><a href=\"https:\/\/otus.pw\/VZqe\/\"><strong>\u0417\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0434\u0435\u043c\u043e-\u0443\u0440\u043e\u043a.<\/strong><\/a><\/p>\n<hr>\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\/company\/otus\/blog\/527562\/\"> https:\/\/habr.com\/ru\/company\/otus\/blog\/527562\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<blockquote>\n<p>\u0412 \u043f\u0440\u0435\u0434\u0434\u0432\u0435\u0440\u0438\u0438 \u0441\u0442\u0430\u0440\u0442\u0430 \u043a\u0443\u0440\u0441\u0430&nbsp;<a href=\"https:\/\/otus.pw\/VZqe\/\">&#171;iOS Developer. Basic&#187;<\/a>&nbsp;\u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0441\u0435\u0440\u0438\u044e \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c\u0441\u044f \u043d\u0430 <a href=\"https:\/\/otus.pw\/VZqe\/\">\u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0439 \u0434\u0435\u043c\u043e-\u0443\u0440\u043e\u043a \u043f\u043e \u0442\u0435\u043c\u0435: &#171;Result Type&#187;<\/a>.<\/p>\n<\/blockquote>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<hr>\n<p><a href=\"https:\/\/habr.com\/ru\/company\/otus\/blog\/526394\/\"><em>\u0427\u0438\u0442\u0430\u0442\u044c \u043f\u0435\u0440\u0432\u0443\u044e \u0447\u0430\u0441\u0442\u044c<\/em><\/a><\/p>\n<hr>\n<p><strong>5. \u0421\u0431\u043e\u0440\u043a\u0430 \u0431\u0438\u043b\u0434\u0430<\/strong><\/p>\n<pre><code class=\"java\">stage('Build') {         withEnv([\"FASTLANE_USER=fastlane_user_email_address\"]) {             withCredentials([                     string([                       credentialsId:'match_password_id',                        variable: 'MATCH_PASSWORD'                     ]),                     string([                       credentialsId: 'fastlane_password_id',                       variable: 'FASTLANE_PASSWORD']),                     ]) {                        sh 'bundle exec fastlane build'                     }         }   }<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u0438 Jenkins Pipeline <a href=\"http:\/\/jenkins.io\/doc\/pipeline\/steps\/workflow-basic-steps\/#withenv-set-environment-variables\"><u>withEnv<\/u><\/a> \u043a\u0430\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u043e <a href=\"https:\/\/docs.fastlane.tools\/best-practices\/continuous-integration\/#environment-variables-to-set\"><u>\u0437\u0434\u0435\u0441\u044c<\/u><\/a>, \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0435\u0439 Fastlane. \u0418\u0442\u0430\u043a, \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f <code>FASTLANE_USER<\/code><em>. <\/em>\u041f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u043c\u044b \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0435\u0449\u0435 \u0434\u0432\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b, MATCH_PASSWORD \u0438 FASTLANE_PASSWORD, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435\u043b\u044c\u0437\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u0435\u0437 \u0443\u0447\u0435\u0442\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u043d\u0438 \u043f\u043e \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 Jenkins \u0432 \u043f\u0443\u043d\u043a\u0442\u0435 \u043c\u0435\u043d\u044e \u00abCredential\u00bb \u0434\u0430\u0448\u0431\u043e\u0440\u0434\u0430 Jenkins \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 secret_text, \u0438 \u0438\u0445 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0432 credentialsId.<\/p>\n<p>\u041e\u043f\u044f\u0442\u044c \u0436\u0435, \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c\u044b\u0439 \u043b\u0435\u0439\u043d \u0432\u043d\u0443\u0442\u0440\u0438 Fastfile, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0441\u0430\u043c\u044b\u043c \u0441\u043b\u043e\u0436\u043d\u044b\u043c \u043b\u0435\u0439\u043d\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"java\">lane :build do      match(         git_branch: \"the_branch_of_the_repo_with_the_prov_profile\",          username: \"github_username\",          git_url: \"github_repo_with_prov_profiles\",          type: \"appstore\",          app_identifier: \"production_app_identifier\",          force: true)         version = get_version_number(                        xcodeproj: \"our_project.xcodeproj\",                         target: \"production_target\"                )      build_number = latest_testflight_build_number(                        version: version,                           app_identifier: \"production_app_identifier\",                        initial_build_number: 0                      )           increment_build_number({ build_number: build_number + 1 })      settings_to_override = {       :BUNDLE_IDENTIFIER =&gt; \"production_bundle_id\",       :PROVISIONING_PROFILE_SPECIFIER =&gt; \"production_prov_profile\",       :DEVELOPMENT_TEAM =&gt; \"team_id\"      }          export_options = {        iCloudContainerEnvironment: \"Production\",        provisioningProfiles: { \"production_bundle_id\": \"production_prov_profile\" }      }           gym(        clean: true,        scheme: \"production_scheme\",        configuration: \"production_configuration\",        xcargs: settings_to_override,        export_method: \"app-store\",        include_bitcode: true,        include_symbols: true,        export_options: export_options      )   end<\/code><\/pre>\n<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u0435\u0433\u043e \u0448\u0430\u0433 \u0437\u0430 \u0448\u0430\u0433\u043e\u043c.<\/p>\n<p>\u041c\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u043a\u0448\u0435\u043d\u0430 Fastlane <a href=\"https:\/\/docs.fastlane.tools\/actions\/match\/\"><u>match<\/u><\/a>. Match \u043f\u043e \u0441\u0443\u0442\u0438 \u0441\u043e\u0437\u0434\u0430\u0435\u0442 \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u044b \u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0445\u0440\u0430\u043d\u044f\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c git-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438, \u0442.\u0435. \u043e\u043d \u043f\u043e \u0441\u0443\u0442\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430. \u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c match \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u043b\u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u043e\u0439 Github-\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439, \u0433\u0434\u0435 \u043c\u044b \u0445\u0440\u0430\u043d\u0438\u043b\u0438 \u0431\u044b \u043d\u0430\u0448\u0438 \u043f\u0440\u043e\u0444\u0438\u043b\u0438 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0435\u043d\u0438\u044f. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u044b, \u0435\u0441\u043b\u0438 \u043c\u044b \u043d\u0435 \u0445\u043e\u0442\u0438\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c match \u0434\u043b\u044f \u043f\u043e\u0434\u043f\u0438\u0441\u0438 \u043a\u043e\u0434\u0430, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u044d\u043a\u0448\u0435\u043d\u044b <a href=\"https:\/\/docs.fastlane.tools\/actions\/sigh\/\"><u>sigh<\/u><\/a> \u0438 <a href=\"https:\/\/docs.fastlane.tools\/actions\/cert\/\"><u>cert<\/u><\/a>.<\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0435. \u0427\u0442\u043e \u0431\u044b \u043c\u044b \u0445\u043e\u0442\u0435\u043b\u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u0442\u0430\u043a \u044d\u0442\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u0435 \u043d\u043e\u043c\u0435\u0440 \u0432\u0435\u0440\u0441\u0438\u0438 \u0431\u0438\u043b\u0434\u0430 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0440\u0435\u043b\u0438\u0437\u0430, \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437 \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0447\u0435\u0440\u0435\u0437 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0431\u0438\u043b\u0434\u0430 Xcode. \u0412\u0441\u0435 \u043c\u044b \u0437\u043d\u0430\u0435\u043c \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0431\u0438\u043b\u0434 \u0432 Testflight \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437 \u0434\u043b\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u0440\u0435\u043b\u0438\u0437\u0430 \u0438 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435 \u0441\u043b\u043e\u0432\u0438\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u043e\u0432\u044b\u0448\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0441\u0431\u043e\u0440\u043a\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0440\u0430\u0437, \u0442.\u0435. \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438\u043b\u0438. plist, \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e, \u0430 \u0437\u0430\u0442\u0435\u043c \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e. \u0412 \u043a\u043e\u0434\u0435, \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435, \u043d\u0430\u043c \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0443 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0443, \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0432 3 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0448\u0430\u0433\u0430:<\/p>\n<\/p>\n<ol>\n<li>\n<p><a href=\"https:\/\/docs.fastlane.tools\/actions\/get_version_number\/%5D\"><u>get_version_number:<\/u><\/a> \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u043e\u0433\u043e \u0432 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f&nbsp;<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.fastlane.tools\/actions\/latest_testflight_build_number\/\"><u>latest_testflight_build_number:<\/u><\/a> \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043d\u043e\u043c\u0435\u0440 \u0431\u0438\u043b\u0434\u0430 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438, \u043a\u043e\u0442\u0440\u0443\u044e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/docs.fastlane.tools\/actions\/increment_build_number\/\"><u>increment_<\/u>build_number:<\/a> \u0418\u043d\u043a\u0440\u0435\u043c\u0435\u043d\u0442 \u043d\u043e\u043c\u0435\u0440\u0430 \u0431\u0438\u043b\u0434\u0430 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c \u0448\u0430\u0433\u043e\u043c (\u0437\u0434\u0435\u0441\u044c \u043d\u0430 \u0435\u0434\u0438\u043d\u0438\u0446\u0443).<\/p>\n<\/li>\n<\/ol>\n<p>\u041d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u044b \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0432\u044b\u0437\u043e\u0432\u043e\u043c \u044d\u043a\u0448\u0435\u043d\u0430 <a href=\"https:\/\/docs.fastlane.tools\/actions\/gym\/\"><u>gym<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u0431\u043e\u0440\u043a\u0443 \u0438 \u0443\u043f\u0430\u043a\u043e\u0432\u043a\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f. \u041e\u043d \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u0430\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438, \u0442\u0430\u043a\u0438\u043c\u0438 \u043a\u0430\u043a configuration, scheme \u0438 xcargs, \u0433\u0434\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c <code>bundle_identifier<\/code><em>, <\/em><code>export_options<\/code> \u0438 \u0442. \u0434.<\/p>\n<\/p>\n<p><strong>6. \u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432 Testflight<\/strong><\/p>\n<\/p>\n<pre><code class=\"go\">stage('Upload to TestFlight') {   withEnv([\"FASTLANE_USER=fastlane_user_email_address\"]) {     withCredentials([       string([            credentialsId: 'fastlane_password_id',             variable: 'FASTLANE_PASSWORD']),        ]) {          sh \"bundle exec fastlane upload_to_testflight\"        }   } }<\/code><\/pre>\n<p>\u0417\u0434\u0435\u0441\u044c \u043c\u044b \u0441\u043d\u043e\u0432\u0430 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b, \u043a\u0430\u043a \u043c\u044b \u0434\u0435\u043b\u0430\u043b\u0438 \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435, \u0438 \u043c\u044b \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0434\u0440\u0443\u0433\u043e\u0439 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0439 \u043b\u0435\u0439\u043d \u0432\u043d\u0443\u0442\u0440\u0438 Fastfile \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"go\">lane :upload_to_testflight do     pilot(       ipa: \".\/build\/our_project.ipa\",       skip_submission: true,       skip_waiting_for_build_processing: true,       app_identifier: \"production_app_identifier\"     ) end<\/code><\/pre>\n<\/p>\n<p>\u041c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 Fastlane <a href=\"https:\/\/docs.fastlane.tools\/actions\/pilot\/\"><u>pilot<\/u><\/a>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u043c \u0448\u0430\u0433\u0435 \u0444\u0430\u0439\u043b .ipa \u0432 Testflight. \u042d\u0442\u0438\u043c \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435\u043c \u043c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043b\u043e\u0433 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u043c\u043e\u0436\u0435\u043c \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0443 \u0434\u0432\u043e\u0438\u0447\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430, \u0447\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0444\u0430\u0439\u043b <code>.ipa<\/code> \u0431\u0443\u0434\u0435\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d, \u043d\u043e \u043d\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d \u0441\u0440\u0435\u0434\u0438 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u043e\u0432.<\/p>\n<\/p>\n<p><strong>7. \u041e\u0447\u0438\u0441\u0442\u043a\u0430&nbsp;<\/strong><\/p>\n<p>\u0418 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435, \u043d\u043e \u043d\u0435 \u043c\u0435\u043d\u0435\u0435 \u0432\u0430\u0436\u043d\u043e\u0435: \u043d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043e\u0447\u0438\u0441\u0442\u043a\u0443 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 Jenkins <a href=\"https:\/\/www.jenkins.io\/doc\/pipeline\/steps\/ws-cleanup\/\"><u>cleanup<\/u><\/a>.<\/p>\n<pre><code class=\"java\">stage('Cleanup') {     cleanWs notFailBuild: true }<\/code><\/pre>\n<\/p>\n<p>\u042d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u043c\u044b \u0443\u0434\u0430\u043b\u044f\u0435\u043c \u0432\u043e\u0440\u043a\u0441\u043f\u0435\u0439\u0441 \u043f\u043e \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0438 \u0441\u0431\u043e\u0440\u043a\u0438, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043e\u043d \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u043d\u0443\u0436\u0435\u043d.<\/p>\n<p>\u041f\u043e\u0434\u0432\u043e\u0434\u044f \u0438\u0442\u043e\u0433, \u0432\u043e\u0442 \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f <code>deploy()<\/code> \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043d\u0443\u0442\u0440\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 <code>Deploy.script<\/code>.<\/p>\n<pre><code class=\"java\">def deploy() {      stage('Checkout') {         checkout scm     }      stage('Install dependencies') {        sh 'gem install bundler'        sh 'bundle update'        sh 'bundle exec pod repo update'        sh 'bundle exec pod install'     }      stage('Reset Simulators') {        sh 'bundle exec fastlane snapshot reset_simulators --force'     }      stage('Run Tests') {        sh 'bundle exec fastlane test'     }          stage('Build') {         withEnv([\"FASTLANE_USER=fastlane_user_email_address\"]) {             withCredentials([                  string([                       credentialsId:'match_password_id',                        variable: 'MATCH_PASSWORD'                  ]),                  string([                       credentialsId: 'fastlane_password_id',                       variable: 'FASTLANE_PASSWORD']),                  ]) {                       sh 'bundle exec fastlane build'                  }         }     }          stage('Upload to TestFlight') {         withEnv([\"FASTLANE_USER=fastlane_user_email_address\"]) {             withCredentials([                  string([                       credentialsId: 'fastlane_password_id',                        variable: 'FASTLANE_PASSWORD']),                   ]) {                       sh \"bundle exec fastlane upload_to_testflight\"                  }        }     }          stage('Cleanup') {         cleanWs notFailBuild: true     } }<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u0448 Fastfile \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code>fastlane_version \"2.75.0\"  default_platform :ios  lane :test do     scan(         clean: true,         devices: [\"iPhone X\"],         workspace: \"our_project.xcworkspace\",         scheme: \"production_scheme\",         code_coverage: true,         output_directory: \".\/test_output\",         output_types: \"html,junit\"     )     slather(         cobertura_xml: true,         proj: \"our_project.xcodeproj\",         workspace: \"our_project.xcworkspace\",         output_directory: \".\/test_output\",         scheme: \"production_scheme\",         jenkins: true,         ignore: [array_of_docs_to_ignore]     ) end  lane :build do      match(         git_branch: \"the_branch_of_the_repo_with_the_prov_profile\",          username: \"github_username\",          git_url: \"github_repo_with_prov_profiles\",          type: \"appstore\",          app_identifier: \"production_app_identifier\",          force: true)         version = get_version_number(                        xcodeproj: \"our_project.xcodeproj\",                         target: \"production_target\"                )      build_number = latest_testflight_build_number(                        version: version,                           app_identifier: \"production_app_identifier\",                        initial_build_number: 0                      )           increment_build_number({ build_number: build_number + 1 })           settings_to_override = {       :BUNDLE_IDENTIFIER =&gt; \"production_bundle_id\",       :PROVISIONING_PROFILE_SPECIFIER =&gt; \"production_prov_profile\",       :DEVELOPMENT_TEAM =&gt; \"team_id\"      }           export_options = {        iCloudContainerEnvironment: \"Production\",        provisioningProfiles: { \"production_bundle_id\": \"production_prov_profile\" }      }          gym(        clean: true,        scheme: \"production_scheme\",        configuration: \"production_configuration\",        xcargs: settings_to_override,        export_method: \"app-store\",        include_bitcode: true,        include_symbols: true,        export_options: export_options      ) end  lane :upload_to_testflight do     pilot(       ipa: \".\/build\/our_project.ipa\",       skip_submission: true,       skip_waiting_for_build_processing: true,       app_identifier: \"production_app_identifier\"     ) end<\/code><\/pre>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f <code>deploy()<\/code> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0438\u0437 \u0441\u043a\u0440\u0438\u043f\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043b\u0438 \u0432 \u0437\u0430\u0434\u0430\u0447\u0435 &#8212; <code>MyScript.groovy<\/code>, \u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c:<\/p>\n<pre><code class=\"java\">node(label: 'ios') {      def deploy;   def utils;    String RVM = \"ruby-2.5.0\"    ansiColor('xterm') {     withEnv([\"LANG=en_US.UTF-8\", \"LANGUAGE=en_US.UTF-8\", \"LC_ALL=en_US.UTF-8\"]) {                  deploy = load(\"jenkins\/Deploy.groovy\")         utils =<\/code><\/pre>\n<\/hr>\n<\/hr>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-312946","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/312946","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=312946"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/312946\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=312946"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=312946"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=312946"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}