Files
tart/docs/integrations/gitlab-runner.md
T
Fedor KorotkovandNikolay Edigaryev 2da8bc0fb5 Document XL Cirrus Runners (#613)
* Document XL Cirrus Runners

Also tried to put everything about Cirrus Runners in one place rather than having the information spreaded between https://tart.run and https://github.com/apps/cirrus-runners.

Plus updated docs to use Sonoma.

* Apply suggestions from code review

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>

---------

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
2023-09-28 15:53:13 -04:00

1.5 KiB

GitLab Runner Executor

It is possible to run GitLab jobs in isolated ephemeral Tart Virtual Machines via Tart Executor. Tart Executor utilizes custom executor feature of GitLab Runner.

Basic Configuration

Configuring Tart Executor for GitLab Runner is as simple as installing gitlab-tart-executor binary from Homebrew:

brew install cirruslabs/cli/gitlab-tart-executor

And updating configuration of your self-hosted GitLab Runner to use gitlab-tart-executor binary:

concurrent = 2

[[runners]]
  # ...
  executor = "custom"
  builds_dir = "/Users/admin/builds" # directory inside the 
  cache_dir = "/Users/admin/cache"
  [runners.feature_flags]
    FF_RESOLVE_FULL_TLS_CHAIN = false
  [runners.custom]
    prepare_exec = "gitlab-tart-executor"
    prepare_args = ["prepare"]
    run_exec = "gitlab-tart-executor"
    run_args = ["run"]
    cleanup_exec = "gitlab-tart-executor"
    cleanup_args = ["cleanup"]

Now you can use Tart Images in your .gitlab-ci.yml:

# You can use any remote Tart Image.
# Tart Executor will pull it from the registry and use it for creating ephemeral VMs.
image: ghcr.io/cirruslabs/macos-sonoma-base:latest

test:
  tags:
    - tart-installed # in case you tagged runners with Tart Executor installed
  script:
    - uname -a

For more advanced configuration please refer to GitLab Tart Executor repository.