{"id":2142,"date":"2025-02-10T20:16:17","date_gmt":"2025-02-10T11:16:17","guid":{"rendered":"https:\/\/aireviewirush.com\/?p=2142"},"modified":"2025-02-10T20:16:18","modified_gmt":"2025-02-10T11:16:18","slug":"aws-codebuild-for-macos-provides-assist-for-fastlane","status":"publish","type":"post","link":"https:\/\/aireviewirush.com\/?p=2142","title":{"rendered":"AWS CodeBuild for macOS provides assist for Fastlane"},"content":{"rendered":"<p> <br \/>\n<\/p>\n<div id=\"\">\n<table id=\"amazon-polly-audio-table\">\n<tbody>\n<tr>\n<td id=\"amazon-polly-audio-tab\">\n<div id=\"amazon-polly-by-tab\">\n            <a href=\"https:\/\/aws.amazon.com\/polly\/\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/a0.awsstatic.com\/aws-blog\/images\/Voiced_by_Amazon_Polly_EN.png\" alt=\"Voiced by Polly\" width=\"554\" height=\"56\"\/><\/a>\n           <\/div>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>I\u2019m happy to announce the supply of <a href=\"https:\/\/fastlane.tools\/\" target=\"_blank\" rel=\"noopener\">Fastlane<\/a> in your <a href=\"https:\/\/aws.amazon.com\/codebuild\/\" target=\"_blank\" rel=\"noopener\">AWS CodeBuild<\/a> for macOS environments. AWS CodeBuild is a totally managed steady integration service that compiles supply code, runs assessments, and produces ready-to-deploy software program packages.<\/p>\n<p>Fastlane is an open supply device suite designed to automate numerous facets of cellular software growth. It gives cellular software builders with a centralized set of instruments to handle duties akin to code signing, screenshot era, beta distribution, and app retailer submissions. It integrates with common steady integration and steady deployment (CI\/CD) platforms and helps each iOS and Android growth workflows. Though Fastlane affords vital automation capabilities, builders might encounter challenges throughout its setup and upkeep. Configuring Fastlane could be complicated, notably for groups unfamiliar with the syntax and package deal administration system of Ruby. Holding Fastlane and its dependencies updated requires ongoing effort, as a result of updates to cellular platforms or third-party companies might necessitate changes to current workflows.<\/p>\n<p>When <a href=\"https:\/\/aws.amazon.com\/blogs\/aws\/add-macos-to-your-continuous-integration-pipelines-with-aws-codebuild\/\" target=\"_blank\" rel=\"noopener\">we launched CodeBuild for macOS in August 2024<\/a>, we knew that certainly one of your challenges was to put in and keep Fastlane in your construct atmosphere. Though it was attainable to manually set up Fastlane in a customized construct atmosphere, at AWS, <a href=\"https:\/\/docs.aws.amazon.com\/wellarchitected\/latest\/framework\/cost-dp.html\" target=\"_blank\" rel=\"noopener\">we take away the undifferentiated heaving lifting out of your infrastructure<\/a> so you may spend extra time on the facets that matter for what you are promoting. Beginning in the present day, Fastlane is put in by default, and you should use the acquainted command <code>fastlane construct<\/code>in your <code>buildspec.yaml<\/code> file.<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Fastlane and code signing<br \/><\/strong><\/span>To distribute an software on the App Retailer, builders should signal their binary with a non-public key generated on the Apple Developer portal. This non-public key, together with the certificates that validates it, should be accessible throughout the construct course of. This generally is a problem for growth groups as a result of they should share the event non-public key (which permits deployment on chosen check units) amongst group members. Moreover, the distribution non-public key (which allows publishing on the App Retailer) should be obtainable throughout the signing course of earlier than importing the binary to the App Retailer.<\/p>\n<p>Fastlane is a flexible construct system in that it additionally helps builders with the administration of growth and distribution keys and certificates. Builders can use <code>fastlane match<\/code> to share signing supplies in a group and make them securely and simply accessible on particular person builders\u2019 machines and on the CI atmosphere. <code>match<\/code> permits the storage of personal keys, the certificates, and the cellular provisioning profiles on a secured share storage. It makes certain that the native construct atmosphere, whether or not it\u2019s a developer laptop computer or a server machine within the cloud, stays in sync with the shared storage. At construct time, it securely downloads the required certificates to signal your app and configures the construct machine to permit the <code>codesign<\/code> utility to select them up.<\/p>\n<p><code>match<\/code> permits the sharing of signing secrets and techniques by GitHub, GitLab, Google Cloud Storage, Azure DevOps, and <a href=\"https:\/\/aws.amazon.com\/s3\/\" target=\"_blank\" rel=\"noopener\">Amazon Easy Storage Service (Amazon S3)<\/a>.<\/p>\n<p>When you already use certainly one of these and also you\u2019re migrating your tasks to CodeBuild, you don\u2019t have a lot to do. You solely want to verify your CodeBuild construct atmosphere has entry to the shared storage (see step 3 within the demo).<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Let\u2019s see the way it works<br \/><\/strong><\/span>When you\u2019re new to Fastlane or CodeBuild, let\u2019s see the way it works.<\/p>\n<p>For this demo, I begin with <a href=\"https:\/\/github.com\/sebsto\/amplify-ios-getting-started\" target=\"_blank\" rel=\"noopener\">an current iOS venture<\/a>. The venture is already configured to be constructed on CodeBuild. You&#8217;ll be able to discuss with my earlier weblog submit, <a href=\"https:\/\/aws.amazon.com\/blogs\/aws\/add-macos-to-your-continuous-integration-pipelines-with-aws-codebuild\/\" target=\"_blank\" rel=\"noopener\">Add macOS to your steady integration pipelines with AWS CodeBuild<\/a>, to study extra particulars.<\/p>\n<p>I\u2019ll present you the right way to get began in three steps:<\/p>\n<ul>\n<li>Import your current signing supplies to a shared non-public GitHub repository<\/li>\n<li>Configure <code>fastlane<\/code> to construct and signal your venture<\/li>\n<li>Use <code>fastlane<\/code>with CodeBuild<\/li>\n<\/ul>\n<p><strong>Step 1: Import your signing supplies<\/strong><\/p>\n<p>Many of the <code>fastlane<\/code> <a href=\"https:\/\/docs.fastlane.tools\/actions\/match\/\" target=\"_blank\" rel=\"noopener\">documentation<\/a> I learn explains the right way to create a brand new key pair and a brand new certificates to get began. Though that is actually true for brand spanking new tasks, in actual life, you in all probability have already got your venture and your signing keys. So, step one is to import these current signing supplies.<\/p>\n<p>Apple App Retailer makes use of completely different keys and certificates for growth and distribution (there are additionally advert hoc and enterprise certificates, however these are outdoors the scope of this submit). It&#8217;s essential to have three recordsdata for every utilization (that\u2019s a complete of six recordsdata):<\/p>\n<ul>\n<li>A <code>.mobileprovision<\/code> file that you may create and obtain from the Apple developer console. The provisioning profile hyperlinks your identification, the app identification, and the entitlements the app may need.<\/li>\n<li>A <code>.cer<\/code> file, which is the certificates emitted by Apple to validate your non-public key. You&#8217;ll be able to obtain this from the <a href=\"https:\/\/developer.apple.com\/account\/resources\/certificates\/list\" target=\"_blank\" rel=\"noopener\">Apple Developer portal<\/a>. Choose the certificates, then choose <strong>Obtain<\/strong>.<\/li>\n<li>A <code>.p12<\/code> file, which comprises your non-public key. You&#8217;ll be able to obtain the important thing while you create it within the <a href=\"https:\/\/developer.apple.com\/account\/resources\/certificates\/add\" target=\"_blank\" rel=\"noopener\">Apple Developer portal<\/a>. When you didn\u2019t obtain it however have it in your machine, you may export it from the Apple Keychain app. Be aware that the KeyChain.app is hidden in macOS 15.x. You&#8217;ll be able to open it with <code>open \/System\/Library\/CoreServices\/Functions\/Keychain Entry.app<\/code>. Choose the important thing you need to export and proper click on to pick <strong>Export.<\/strong><\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/da4b9237bacccdf19c0760cab7aec4a8359010b0\/2025\/01\/31\/2025-01-31_17-16-05.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-93462\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/da4b9237bacccdf19c0760cab7aec4a8359010b0\/2025\/01\/31\/2025-01-31_17-16-05-1024x561.png\" alt=\"Export p12 files from Keychain\" width=\"1024\" height=\"561\"\/><\/a><\/td>\n<td><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/da4b9237bacccdf19c0760cab7aec4a8359010b0\/2025\/01\/31\/2025-01-31_17-17-53.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-93463\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/da4b9237bacccdf19c0760cab7aec4a8359010b0\/2025\/01\/31\/2025-01-31_17-17-53.png\" alt=\"\" width=\"1286\" height=\"450\"><\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>When you&#8217;ve these recordsdata, create a <code>fastlane\/Matchfile<\/code> file with the next content material:<\/p>\n<pre><code class=\"lang-ruby\">git_url(\"https:\/\/github.com\/sebsto\/secret.git\")\nstorage_mode(\"git\")\nsort(\"growth\")\n# or use appstore to make use of the distribution signing key and certificates\n# sort(\"appstore\")<\/code><\/pre>\n<p>Be sure you exchange the URL of your GitHub repository and <span style=\"color: #ff0000;\"><strong>ensure that this repository is non-public<\/strong><\/span>. It&#8217;ll function a storage in your signing key and certificates.<\/p>\n<p>Then, I import my current recordsdata with the <code>fastlane match import --type appstore<\/code> command. I repeat the command for every atmosphere: <code>appstore<\/code> and <code>growth<\/code>.<\/p>\n<p>The very first time, <code>fastlane<\/code> prompts me for my Apple Id username and password. It connects to App Retailer Hook up with confirm the validity of the certificates or to create new ones when crucial. The session cookie is saved in <code>~\/.fastlane\/spaceship\/&lt;your apple consumer id&gt;\/cookie<\/code>.<\/p>\n<p><code>fastlane match<\/code> additionally asks for a password. It makes use of this password to generate a key to crypt the signing supplies on the storage. Don\u2019t neglect this password as a result of will probably be used at construct time to import the signing supplies on the construct machine.<\/p>\n<p>Right here is the command and its output in full:<\/p>\n<pre><code class=\"lang-bash\"> fastlane match import --type appstore\n\n[\u2714] \ud83d\ude80\n[16:43:54]: Efficiently loaded '~\/amplify-ios-getting-started\/code\/fastlane\/Matchfile' \ud83d\udcc4\n\n+-----------------------------------------------------+\n| Detected Values from '.\/fastlane\/Matchfile'         |\n+--------------+--------------------------------------+\n| git_url.     | https:\/\/github.com\/sebsto\/secret.git |\n| storage_mode | git                                  |\n| sort         | growth                          |\n+--------------+--------------------------------------+\n\n[16:43:54]: Certificates (.cer) path:\n.\/secrets and techniques\/sebsto-apple-dist.cer\n[16:44:07]: Personal key (.p12) path:\n.\/secrets and techniques\/sebsto-apple-dist.p12\n[16:44:12]: Provisioning profile (.mobileprovision or .provisionprofile) path or go away empty to skip\nthis file:\n.\/secrets and techniques\/amplifyiosgettingstarteddist.mobileprovision\n[16:44:25]: Cloning distant git repo...\n[16:44:25]: If cloning the repo takes too lengthy, you should use the `clone_branch_directly` possibility in match.\n[16:44:27]: Testing department grasp...\n[16:44:27]: Enter the passphrase that must be used to encrypt\/decrypt your certificates\n[16:44:27]: This passphrase is particular per repository and will probably be saved in your native keychain\n[16:44:27]: Make certain to recollect the password, as you may want it while you run match on a special machine\n[16:44:27]: Passphrase for Match storage: ********\n[16:44:30]: Sort passphrase once more: ********\nsafety: SecKeychainAddInternetPassword &lt;NULL&gt;: The required merchandise already exists within the keychain.\n[16:44:31]: \ud83d\udd13 Efficiently decrypted certificates repo\n[16:44:31]: Repo is at: '\/var\/folders\/14\/nwpsn4b504gfp02_mrbyd2jr0000gr\/T\/d20250131-41830-z7b4ic'\n[16:44:31]: Login to App Retailer Join (sebsto@mac.com)\n[16:44:33]: Enter the passphrase that must be used to encrypt\/decrypt your certificates\n[16:44:33]: This passphrase is particular per repository and will probably be saved in your native keychain\n[16:44:33]: Make certain to recollect the password, as you may want it while you run match on a special machine\n[16:44:33]: Passphrase for Match storage: ********\n[16:44:37]: Sort passphrase once more: ********\nsafety: SecKeychainAddInternetPassword &lt;NULL&gt;: The required merchandise already exists within the keychain.\n[16:44:39]: \ud83d\udd12 Efficiently encrypted certificates repo\n[16:44:39]: Pushing adjustments to distant git repo...\n[16:44:40]: Completed importing recordsdata to Git Repo [https:\/\/github.com\/sebsto\/secret.git]\n<\/code><\/pre>\n<p>I confirm that Fastlane imported my signing materials to my Git repository.<\/p>\n<p><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/da4b9237bacccdf19c0760cab7aec4a8359010b0\/2025\/01\/31\/2025-01-31_17-42-52.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter size-full wp-image-93464\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/da4b9237bacccdf19c0760cab7aec4a8359010b0\/2025\/01\/31\/2025-01-31_17-42-52.png\" alt=\"Fastlane match - github repo after import\" width=\"931\" height=\"356\"\/><\/a><\/p>\n<p>I also can configure my native machine to make use of these signing supplies throughout the subsequent construct:<\/p>\n<pre><code class=\"lang-txt\">\u00bb fastlane match appstore \n\n[\u2714] \ud83d\ude80 \n[17:39:08]: Efficiently loaded '~\/amplify-ios-getting-started\/code\/fastlane\/Matchfile' \ud83d\udcc4\n\n+-----------------------------------------------------+\n|   Detected Values from '.\/fastlane\/Matchfile'       |\n+--------------+--------------------------------------+\n| git_url      | https:\/\/github.com\/sebsto\/secret.git |\n| storage_mode | git                                  |\n| sort         | growth                          |\n+--------------+--------------------------------------+\n\n\n+-------------------------------------------------------------------------------------------+\n|                                 Abstract for match 2.226.0                                 |\n+----------------------------------------+--------------------------------------------------+\n| sort                                   | appstore                                         |\n| readonly                               | false                                            |\n| generate_apple_certs                   | true                                             |\n| skip_provisioning_profiles             | false                                            |\n| app_identifier                         | [\"com.amazonaws.amplify.mobile.getting-started\"] |\n| username                               | xxxx@xxxxxxxxx                                   |\n| team_id                                | XXXXXXXXXX                                       |\n| storage_mode                           | git                                              |\n| git_url                                | https:\/\/github.com\/sebsto\/secret.git             |\n| git_branch                             | grasp                                           |\n| shallow_clone                          | false                                            |\n| clone_branch_directly                  | false                                            |\n| skip_google_cloud_account_confirmation | false                                            |\n| s3_skip_encryption                     | false                                            |\n| gitlab_host                            | https:\/\/gitlab.com                               |\n| keychain_name                          | login.keychain                                   |\n| power                                  | false                                            |\n| force_for_new_devices                  | false                                            |\n| include_mac_in_profiles                | false                                            |\n| include_all_certificates               | false                                            |\n| force_for_new_certificates             | false                                            |\n| skip_confirmation                      | false                                            |\n| safe_remove_certs                      | false                                            |\n| skip_docs                              | false                                            |\n| platform                               | ios                                              |\n| derive_catalyst_app_identifier         | false                                            |\n| fail_on_name_taken                     | false                                            |\n| skip_certificate_matching              | false                                            |\n| skip_set_partition_list                | false                                            |\n| force_legacy_encryption                | false                                            |\n| verbose                                | false                                            |\n+----------------------------------------+--------------------------------------------------+\n\n[17:39:08]: Cloning distant git repo...\n[17:39:08]: If cloning the repo takes too lengthy, you should use the `clone_branch_directly` possibility in match.\n[17:39:10]: Testing department grasp...\n[17:39:10]: Enter the passphrase that must be used to encrypt\/decrypt your certificates\n[17:39:10]: This passphrase is particular per repository and will probably be saved in your native keychain\n[17:39:10]: Make certain to recollect the password, as you may want it while you run match on a special machine\n[17:39:10]: Passphrase for Match storage: ********\n[17:39:13]: Sort passphrase once more: ********\nsafety: SecKeychainAddInternetPassword &lt;NULL&gt;: The required merchandise already exists within the keychain.\n[17:39:15]: \ud83d\udd13  Efficiently decrypted certificates repo\n[17:39:15]: Verifying that the certificates and profile are nonetheless legitimate on the Dev Portal...\n[17:39:17]: Putting in certificates...\n\n+-------------------------------------------------------------------------+\n|                          Put in Certificates                          |\n+-------------------+-----------------------------------------------------+\n| Consumer ID           | XXXXXXXXXX                                          |\n| Widespread Title       | Apple Distribution: Sebastien Stormacq (XXXXXXXXXX) |\n| Organisation Unit | XXXXXXXXXX                                          |\n| Organisation      | Sebastien Stormacq                                  |\n| Nation           | US                                                  |\n| Begin Datetime    | 2024-10-29 09:55:43 UTC                             |\n| Finish Datetime      | 2025-10-29 09:55:42 UTC                             |\n+-------------------+-----------------------------------------------------+\n\n[17:39:18]: Putting in provisioning profile...\n\n+-------------------------------------------------------------------------------------------------------------------+\n|                                          Put in Provisioning Profile                                           |\n+---------------------+----------------------------------------------+----------------------------------------------+\n| Parameter           | Setting Variable                         | Worth                                        |\n+---------------------+----------------------------------------------+----------------------------------------------+\n| App Identifier      |                                              | com.amazonaws.amplify.cellular.getting-starte  |\n|                     |                                              | d                                            |\n| Sort                |                                              | appstore                                     |\n| Platform            |                                              | ios                                          |\n| Profile UUID        | sigh_com.amazonaws.amplify.cellular.getting-s  | 4e497882-d80f-4684-945a-8bfec1b310b9         |\n|                     | tarted_appstore                              |                                              |\n| Profile Title        | sigh_com.amazonaws.amplify.cellular.getting-s  | amplify-ios-getting-started-dist             |\n|                     | tarted_appstore_profile-name                 |                                              |\n| Profile Path        | sigh_com.amazonaws.amplify.cellular.getting-s  | \/Customers\/stormacq\/Library\/MobileDevice\/Provis  |\n|                     | tarted_appstore_profile-path                 | ioning                                       |\n|                     |                                              | Profiles\/4e497882-d80f-4684-945a-8bfec1b310  |\n|                     |                                              | b9.mobileprovision                           |\n| Growth Group ID | sigh_com.amazonaws.amplify.cellular.getting-s  | XXXXXXXXXX                                   |\n|                     | tarted_appstore_team-id                      |                                              |\n| Certificates Title    | sigh_com.amazonaws.amplify.cellular.getting-s  | Apple Distribution: Sebastien Stormacq       |\n|                     | tarted_appstore_certificate-name             | (XXXXXXXXXX)                                 |\n+---------------------+----------------------------------------------+----------------------------------------------+\n\n[17:39:18]: All required keys, certificates and provisioning profiles are put in \ud83d\ude4c<\/code><\/pre>\n<p><strong>Step 2: Configure Fastlane to signal your venture<\/strong><\/p>\n<p>I create a Fastlane construct configuration file in <code>fastlane\/Fastfile<\/code> (you should use <code>fastlane init<\/code> command to get began):<\/p>\n<pre><code class=\"lang-ruby\">default_platform(:ios)\n\nplatform :ios do\n  before_all do\n    setup_ci\n  finish\n\n  desc \"Construct and Signal the binary\"\n  lane :construct do\n    match(sort: \"appstore\", readonly: true)\n    gymnasium(\n      scheme: \"getting began\",\n      export_method: \"app-store\"\n    )\n  finish\nfinish\n<\/code><\/pre>\n<p>Ensure that the <code>setup_ci<\/code> motion is added to the <code>before_all<\/code> part of <code>Fastfile<\/code> for the <code>match<\/code> motion to operate accurately. This motion creates a short lived Fastlane keychain with right permissions. With out this step, you might encounter construct failures or inconsistent outcomes.<\/p>\n<p>And I check an area construct with the command <code>fastlane construct<\/code>. I enter the password I used when importing my keys and certificates, then I let the system construct and signal my venture. When the whole lot is accurately configured, it produces an identical output.<\/p>\n<pre><code class=\"lang-txt\">...\n[17:58:33]: Efficiently exported and compressed dSYM file\n[17:58:33]: Efficiently exported and signed the ipa file:\n[17:58:33]: ~\/amplify-ios-getting-started\/code\/getting began.ipa\n\n+---------------------------------------+\n|           fastlane abstract            |\n+------+------------------+-------------+\n| Step | Motion           | Time (in s) |\n+------+------------------+-------------+\n| 1    | default_platform | 0           |\n| 2    | setup_ci         | 0           |\n| 3    | match            | 36          |\n| 4    | gymnasium              | 151         |\n+------+------------------+-------------+\n\n[17:58:33]: fastlane.instruments completed efficiently \ud83c\udf89<\/code><\/pre>\n<p><strong>Step 3: Configure CodeBuild to make use of Fastlane<\/strong><\/p>\n<p>Subsequent, I create a venture on CodeBuild. I\u2019m not going into the step-by-step information that can assist you to take action. You&#8217;ll be able to discuss with <a href=\"https:\/\/aws.amazon.com\/blogs\/aws\/add-macos-to-your-continuous-integration-pipelines-with-aws-codebuild\/\" target=\"_blank\" rel=\"noopener\">my earlier submit<\/a> or to <a href=\"https:\/\/docs.aws.amazon.com\/codebuild\/latest\/userguide\/fleets.html#fleets.configure-macos\" target=\"_blank\" rel=\"noopener\">the CodeBuild documentation<\/a>.<\/p>\n<p>There is only one Fastlane-specific configuration. To entry the signing supplies, Fastlane requires entry to 3 secret values that I\u2019ll move as atmosphere variables:<\/p>\n<ul>\n<li><code>MATCH_PASSWORD<\/code>, the password I entered when importing the signing materials. Fastlane makes use of this password to decipher the encrypted recordsdata within the GitHub repository<\/li>\n<li><code>FASTLANE_SESSION<\/code>, the worth of the Apple Id session cookie, positioned at <code>~\/.fastlane\/spaceship\/&lt;your apple consumer id&gt;\/cookie<\/code>. The session is legitimate from a few hours to a number of days. When the session expires, reauthenticate with the command <code>fastlane spaceauth<\/code> out of your laptop computer and replace the worth of <code>FASTLANE_SESSION<\/code> with the brand new worth of the cookie.<\/li>\n<li><code>MATCH_GIT_BASIC_AUTHORIZATION<\/code>, a base 64 encoding of your GitHub username, adopted by a colon, adopted by a private authentication token (PAT) to entry your non-public GitHub repository. You&#8217;ll be able to generate PAT on <a href=\"https:\/\/github.com\/settings\/personal-access-tokens\" target=\"_blank\" rel=\"noopener\">the GitHub console<\/a> in Your Profile &gt; Settings &gt; Builders Settings &gt; Private Entry Token. I exploit this command to generate the worth of this atmosphere variable: <code>echo -n my_git_username:my_git_pat | base64<\/code>.<\/li>\n<\/ul>\n<p>Be aware that for every of those three values, I can enter the Amazon Useful resource Title (ARN) of the key on <a href=\"https:\/\/aws.amazon.com\/secrets-manager\/\" target=\"_blank\" rel=\"noopener\">AWS Secrets and techniques Supervisor<\/a> or the plain textual content worth. We strongly <a href=\"https:\/\/docs.aws.amazon.com\/codebuild\/latest\/userguide\/build-spec-ref.html#build-spec.env.secrets-manager\" target=\"_blank\" rel=\"noopener\">suggest utilizing Secrets and techniques Supervisor to retailer security-sensitive values<\/a>.<\/p>\n<p>I\u2019m a security-conscious consumer, so I retailer the three secrets and techniques in Secrets and techniques Supervisor with these instructions:<\/p>\n<p><code class=\"lang-sh\">aws --region $REGION secretsmanager create-secret --name \/CodeBuild\/MATCH_PASSWORD --secret-string MySuperSecretPassword<br \/>aws --region $REGION secretsmanager create-secret --name \/CodeBuild\/FASTLANE_SESSION --secret-string $(cat ~\/.fastlane\/spaceship\/my_appleid_username\/cookie)<br \/>aws --region $REGION secretsmanager create-secret --name \/CodeBuild\/MATCH_GIT_BASIC_AUTHORIZATION --secret-string $(echo -n my_git_username:my_git_pat | base64)<br \/><\/code><\/p>\n<p>In case your construct venture refers to secrets and techniques saved in Secrets and techniques Supervisor, the construct venture\u2019s service position should permit the\u00a0<code>secretsmanager:GetSecretValue<\/code> motion. When you selected <strong>New service position<\/strong> while you created your venture, CodeBuild contains this motion within the default service position in your construct venture. Nonetheless, in case you selected <strong>Current service position<\/strong>, you should embody this motion to your service position individually.<\/p>\n<p>For this demo, I exploit this <a href=\"https:\/\/aws.amazon.com\/iam\/\" target=\"_blank\" rel=\"noopener\">AWS Identification and Entry Administration (IAM)<\/a> coverage:<\/p>\n<pre><code class=\"lang-json\">{\n\t\"Model\": \"2012-10-17\",\n\t\"Assertion\": [\n\t\t{\n\t\t\t\"Effect\": \"Allow\",\n\t\t\t\"Action\": [\n\t\t\t\t\"secretsmanager:GetSecretValue\"\n\t\t\t],\n\t\t\t\"Useful resource\": [\n\t\t\t\t\"arn:aws:secretsmanager:us-east-2:012345678912:secret:\/CodeBuild\/*\"\n\t\t\t]\n\t\t}\n\t]\n}<\/code><\/pre>\n<p>After I created the venture within the CodeBuild part of the <a href=\"https:\/\/console.aws.amazon.com\" target=\"_blank\" rel=\"noopener\">AWS Administration Console<\/a>, I enter the three atmosphere variables. Discover that the worth is the title of the key in Secrets and techniques Supervisor.<\/p>\n<p><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/da4b9237bacccdf19c0760cab7aec4a8359010b0\/2025\/02\/03\/2025-02-03_18-20-53.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-93498 size-full\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/da4b9237bacccdf19c0760cab7aec4a8359010b0\/2025\/02\/03\/2025-02-03_18-20-53.png\" alt=\"Codebuild - environment variables for Fastlane match\" width=\"719\" height=\"272\"\/><\/a><\/p>\n<p>You can too outline the atmosphere variables and their Secrets and techniques Supervisor secret title in your <code>buildpsec.yaml<\/code>\u00a0file.<\/p>\n<p>Subsequent, I modify the <code>buildspec.yaml<\/code> file on the root of my venture to make use of <code>fastlane<\/code> to construct and signal the binary. My <code>buildspec.yaml<\/code> file now appears to be like like this one:<\/p>\n<pre><code class=\"lang-yaml\"># buildspec.yml\nmodel: 0.2\nphases:\n  set up:\n    instructions:\n      - code\/ci_actions\/00_install_rosetta.sh\n  pre_build:\n    instructions:\n      - code\/ci_actions\/02_amplify.sh\n  construct:\n    instructions:\n      - (cd code &amp;&amp; fastlane construct)\nartifacts:\n  title: getting-started-$(date +%Y-%m-%d).ipa\n  recordsdata:\n    - 'getting began.ipa'\n  base-directory: 'code'<\/code><\/pre>\n<p>The Rosetta and Amplify scripts are required to obtain the Amplify configuration for the backend. When you don\u2019t use <a href=\"https:\/\/aws-amplify.github.io\/\" target=\"_blank\" rel=\"noopener\">AWS Amplify<\/a> in your venture, you don\u2019t want these.<\/p>\n<p>Discover that there&#8217;s nothing within the construct file that downloads the signing key or prepares the keychain within the construct atmosphere; <code>fastlane match<\/code> will try this for me.<\/p>\n<p>I add the brand new <code>buildspec.yaml<\/code> file and my <code>.\/fastlane<\/code>\u00a0listing to Git. I commit and push these recordsdata. <code>git commit -m \"add fastlane assist\" &amp;&amp; git push<\/code><\/p>\n<p>When the whole lot goes properly, I can see the construct operating on CodeBuild and the <span style=\"color: #339966;\"><strong>Succeeded<\/strong><\/span> message.<\/p>\n<p><a href=\"https:\/\/d2908q01vomqb2.cloudfront.net\/da4b9237bacccdf19c0760cab7aec4a8359010b0\/2025\/02\/04\/2025-02-04_09-25-46.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" loading=\"lazy\" class=\"aligncenter wp-image-93507\" src=\"https:\/\/d2908q01vomqb2.cloudfront.net\/da4b9237bacccdf19c0760cab7aec4a8359010b0\/2025\/02\/04\/2025-02-04_09-25-46-1024x655.png\" alt=\"Codebuild - succeed message\" width=\"800\" height=\"512\"\/><\/a><\/p>\n<p><strong><span style=\"text-decoration: underline;\">Pricing and availability<\/span><br \/><\/strong>Fastlane is now pre-installed at no further value on all macOS photos that CodeBuild makes use of, in all <a href=\"https:\/\/docs.aws.amazon.com\/glossary\/latest\/reference\/glos-chap.html#region\" target=\"_blank\" rel=\"noopener\">Areas<\/a> the place CodeBuild for macOS is on the market. On the time of this writing, these are US East (Ohio, N. Virginia), US West (Oregon), Asia Pacific (Sydney), and Europe (Frankfurt).<\/p>\n<p>In my expertise, it takes a little bit of time to configure <code>fastlane match<\/code> accurately. When it\u2019s configured, having it engaged on CodeBuild is fairly easy. Earlier than attempting this on CodeBuild, make certain it really works in your native machine. When one thing goes incorrect on CodeBuild, triple-check the values of the atmosphere variables and ensure CodeBuild has entry to your secrets and techniques on AWS Secrets and techniques Supervisor.<\/p>\n<p>Now go construct (on macOS)!<\/p>\n<p>       <!-- '\"` -->\n      <\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>I\u2019m happy to announce the supply of Fastlane in your AWS CodeBuild for macOS environments. AWS CodeBuild is a totally managed steady integration service that compiles supply code, runs assessments, and produces ready-to-deploy software program packages. Fastlane is an open supply device suite designed to automate numerous facets of cellular software growth. It gives cellular [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2144,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-2142","post","type-post","status-publish","format-standard","has-post-thumbnail","category-cloud-computing"],"_links":{"self":[{"href":"https:\/\/aireviewirush.com\/index.php?rest_route=\/wp\/v2\/posts\/2142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aireviewirush.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aireviewirush.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aireviewirush.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/aireviewirush.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2142"}],"version-history":[{"count":1,"href":"https:\/\/aireviewirush.com\/index.php?rest_route=\/wp\/v2\/posts\/2142\/revisions"}],"predecessor-version":[{"id":2143,"href":"https:\/\/aireviewirush.com\/index.php?rest_route=\/wp\/v2\/posts\/2142\/revisions\/2143"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aireviewirush.com\/index.php?rest_route=\/wp\/v2\/media\/2144"}],"wp:attachment":[{"href":"https:\/\/aireviewirush.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aireviewirush.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aireviewirush.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}