Skip to content
Snippets Groups Projects
Commit fb2a5606 authored by Suzanne Selhorn's avatar Suzanne Selhorn
Browse files

Merge branch 'runner-saas-macos-la-docs' into 'master'

SaaS Runners on macOS limited availability - docs

See merge request gitlab-org/gitlab!87303
parents 3ab6e0e2 77d89b85
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -193,9 +193,12 @@ The cost factor for a job running on a shared runner is:
 
### Additional costs on GitLab SaaS
 
On GitLab SaaS, shared runners can have different cost factors depending on the cost involved
in executing the runner. For example, a high spec shared runner could be set to have a cost factor of `2`.
Conversely, a shared runner that executes jobs for public projects could have a low cost factor, like `0.008`.
GitLab SaaS shared runners have different cost factors, depending on the runner type (Linux, Windows, macOS) and the virtual machine configuration.
| GitLab SaaS runner type | Virtual machine configuration | CI/CD minutes cost factor |
| :--------- | :------------------- | :--------- |
| Linux OS + Docker executor| 1 vCPU, 3.75 GB RAM |1|
| macOS + shell executor | 4 vCPU, 10 GB RAM| 6 |
 
### Monthly reset of CI/CD minutes
 
Loading
Loading
---
stage: Verify
group: Runner
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# Code signing for SaaS runners on macOS
> Introduced in GitLab 15.0.
Before you can integrate GitLab with Apple services, install to a device, or deploy to the Apple App Store, you must [code sign](https://developer.apple.com/support/code-signing/) your application.
To code sign an iOS project, you need the following files:
- A certifcate issued by Apple.
- A provisioning profile.
## Code signing iOS Projects with fastlane
When you use SaaS runners on macOS, each job runs on a VM. Included in each VM is [fastlane](https://fastlane.tools/),
an open-source solution aimed at simplifying mobile app deployment.
These steps outline the minimal setup required to use fastlane to code sign your application. Refer to the fastlane [getting started guide](https://docs.fastlane.tools/), [best practices for integrating with GitLab CI](https://docs.fastlane.tools/best-practices/continuous-integration/gitlab/) and the [fastlane code signing getting started guide](https://docs.fastlane.tools/codesigning/getting-started/) for installation instructions, and an overview of how to use fastlane to handle code signing.
To use fastlane to code sign your application:
1. At the root of your project repository, on your local development system, run this command:
```plaintext
fastlane match init
```
This command creates the `fastlane` directory and adds two files: `Fastfile` and `Appfile`.
1. Open `Appfile` and edit it to include your Apple ID and app ID.
```plaintext
app_identifier("APP IDENTIFIER") # The bundle identifier of your app
apple_id("APPLE ID") # Your Apple email address
```
1. Open `Fastfile`, which includes the fastlane build steps.
In the following snippet, the steps `get_certificates`, `get_provisioning_profile,match`, `gym`, and
`upload_to_testflight` are fastlane [actions](https://docs.fastlane.tools/actions/).
```plaintext
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
default_platform(:ios)
platform :ios do
desc "Build the application"
lane :beta do
increment_build_number(
build_number: latest_testflight_build_number + 1,
xcodeproj: "${PROJECT_NAME}.xcodeproj"
)
get_certificates
get_provisioning_profile
# match(type: "appstore",read_only: true)
gym
upload_to_testflight
end
end
```
The example configuration also includes an optional `Gymfile`. This file stores configuration
parameters and is used by the fastlane [`gym`](https://docs.fastlane.tools/actions/gym/) action.
## Using fastlane match
To simplify the code signing process and implement the
[Code Signing Best Practices Guide](https://codesigning.guide/) recommendations,
use [fastlane match](https://docs.fastlane.tools/actions/match/).
- Use one code signing identity shared across your team.
- Store the required certificates and provisioning profiles in a separate GitLab project repository.
Match automatically syncs iOS and macOS keys and provisioning profiles across all team members with access to the GitLab project. Each team member with access to the project can use the credentials for code signing.
To use fastlane match:
1. Initialize match in the project repository:
```shell
bundle exec fastlane match init
```
1. Select `git` as your storage node.
1. Enter the URL of the GitLab project you plan to use to store your code signing identities.
1. Optional. To create a new certificate and provisioning profile, run:
```shell
bundle exec fastlane match development
```
For different code signing identities' storage options, and for a complete step-by-step guide for using match,
refer to the [match documentation](https://docs.fastlane.tools/actions/match/#usage).
### Environment variables and authentication
To complete the setup, you must configure environment variables to use with fastlane. The required variables are outlined in the [fastlane documentation](https://docs.fastlane.tools/best-practices/continuous-integration/#environment-variables-to-set).
To support Apple's two factor authentication requirement, configure these variables:
- `FASTLANE_APPLE_APPLICATION_SPECIFIC_PASSWORD` and
- `FASTLANE_SESSION`
To authenticate fastlane with the App Store for the TestFlight upload, configure these variables:
- `FASTLANE_USER` and
- `FASTLANE_PASSWORD`
View the [fastlane authentication with Apple Services guide](https://docs.fastlane.tools/getting-started/ios/authentication/) for an overview of authentication options.
## Related topics
- [Apple Developer Support - Code Signing](https://developer.apple.com/support/code-signing/)
- [Code Signing Best Practice Guide](https://codesigning.guide/)
Loading
Loading
@@ -20,7 +20,7 @@ Each time you run a job that requires tooling or dependencies not available in t
GitLab SaaS provides macOS build machines on Apple servers with Intel x86-64 processors.
The expectation is that virtual machines running on the Apple M1 chip will be available in the second half of 2022.
 
For the [Beta](../../../../policy/alpha-beta-support.md#beta-features), there is only one available machine type, `gbc-macos-large`.
At this time there is only one available machine type offered, `gbc-macos-large`.
 
| Instance type | vCPUS | Memory (GB) |
| --------- | --- | ------- |
Loading
Loading
Loading
Loading
@@ -4,10 +4,9 @@ group: Runner
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
 
# SaaS runners on macOS (beta) **(PREMIUM SAAS)**
# SaaS runners on macOS (Limited Availability) **(PREMIUM SAAS)**
 
SaaS runners on macOS are in [Beta](../../../policy/alpha-beta-support.md#beta-features)
and shouldn't be relied upon for mission-critical production jobs.
SaaS runners on macOS are now in [Limited Availability](../../../policy/alpha-beta-support.md#beta-features) for approved open source programs and customers in Premium and Ultimate plans.
 
SaaS runners on macOS provide an on-demand macOS build environment integrated with
GitLab SaaS [CI/CD](../../../ci/index.md).
Loading
Loading
@@ -15,11 +14,17 @@ Use these runners to build, test, and deploy apps for the Apple ecosystem (macOS
of all the capabilities of the GitLab single DevOps platform and not have to manage or operate a
build environment.
 
CI/CD minutes used on GitLab SaaS macOS runners are included in your CI/CD minute consumption totals. CI jobs that run on macOS **will** consume CI minutes at a faster rate than CI jobs on the GitLab SaaS runners on Linux.
Refer to the CI/CD minutes [cost factor](../../../ci/pipelines/cicd_minutes.md#cost-factor) for the cost factor applied to the GitLab SaaS macOS runners.
## Quickstart
 
To start using SaaS runners on macOS, you must submit an access request [issue](https://gitlab.com/gitlab-com/macos-buildcloud-runners-beta/-/issues/new?issuable_template=beta_access_request). After your
access has been granted and your build environment configured, you must configure your
`.gitlab-ci.yml` pipeline file:
To start using SaaS runners on macOS, you must be an active GitLab SaaS Premium or Ultimate customer. Participants in the GitLab Open Source program are also eligible to use the service.
### Configuring your pipeline
To start using the SaaS runners on macOS to run your CI jobs, you must configure your `.gitlab-ci.yml` file:
 
1. Add a `.gitlab-ci.yml` file to your project repository.
1. Specify the [image](macos/environment.md#vm-images) you want to use.
Loading
Loading
@@ -27,7 +32,7 @@ access has been granted and your build environment configured, you must configur
 
The runners automatically run your build.
 
## Example `.gitlab-ci.yml` file
### Example `.gitlab-ci.yml` file
 
The following sample `.gitlab-ci.yml` file shows how to start using the SaaS runners on macOS:
 
Loading
Loading
@@ -42,7 +47,7 @@ stages:
- test
 
before_script:
- echo "started by ${GITLAB_USER_NAME}"
- echo "started by ${GITLAB_USER_NAME}"
 
build:
extends:
Loading
Loading
@@ -60,4 +65,13 @@ test:
```
 
NOTE:
During the Beta period, the architecture of this solution will change. Rather than the jobs running on a specific VM instance, they will run on an ephemeral VM instance that is created by an autoscaling instance, known as the Runner Manager. We will notify all Beta participants of any downtime required to do this work.
You can specify a different Xcode image to run a job. To do so, replace the value for the `image` keyword with the value of the [virtual machine image name](macos/environment.md#vm-images) from the list of available images.
## SaaS runners on macOS service level objective
In SaaS runners on macOS, the objective is to make 90% of CI jobs start executing in 120 seconds or less. The error rate should be less than 0.5%.
## Known Limitations and Usage Constraints
- If the VM image does not include the specific software version you need for your job, then the job execution time will increase as the required software needs to be fetched and installed.
- At this time, it is not possible to bring your own OS image.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment