cirruslabs / cirruslabs/gitlab-tart-executor

Can't get the config argument --builds-dir working.

Open
#129 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
102
Forks
14
Avg merge
21h 24m
Merged PRs (30d)
1

Description

I’m trying to understand how the `builds-dir` works with the Tart runner, and how to share a checked-out repository from the macOS host into a vanilla Tart VM.

**My goal is to:**

1. Job 1 (shell executor on host) - Clone the repository on the macOS host.
2. Job 2 (Tart executor) - Start a **vanilla macOS** VM and mount the previously cloned repository from Job 1 into the VM.

However, I’m running into issues with how the Tart executor mounts the `builds-dir`.

**The Problem**

Even though I configure a custom `--builds-dir` on the host `/Users/sysadmin/builds` the Tart executor always mounts it inside the VM as: `/var/tmp/builds`.

**Runner Configuration**

```
concurrent = 2
check_interval = 0
connection_max_age = "15m0s"
shutdown_timeout = 0

[session_server]
session_timeout = 1800

[[runners]]
name = "mac-mini-01-tart"
url = "https://foo.bar"
id = 123
token = "token-xyz"
executor = "custom"
[runners.feature_flags]
FF_RESOLVE_FULL_TLS_CHAIN = false
[runners.custom]
config_exec = "gitlab-tart-executor"
config_args = ["config", "--builds-dir", "/Users/sysadmin/builds"]
prepare_exec = "gitlab-tart-executor"
prepare_args = ["prepare"]
run_exec = "gitlab-tart-executor"
run_args = ["run"]
cleanup_exec = "gitlab-tart-executor"
cleanup_args = ["cleanup"]

[[runners]]
name = "mac-mini-01-shell"
url = "https://foo.bar"
id = 123
token = "token-xyz"
executor = "shell"
```

**.gitlab-ci.yml**
```
stages:
- checkout
- build

host-checkout:
stage: checkout
tags:
- macos-shell
script:
- echo "Repository checked out on host at $CI_PROJECT_DIR"
- ls -la

dotnet-dev:
stage: build
needs: [host-checkout]
variables:
GIT_STRATEGY: none
tags:
- tart-mac
image: ghcr.io/cirruslabs/macos-tahoe-vanilla:latest
script:
- echo "CI_PROJECT_DIR=$CI_PROJECT_DIR"
- ls -la "$CI_PROJECT_DIR"
```

**Job 1 Output (Shell Runner – Host)**
```
Running with gitlab-runner 18.7.1 (cc7f9277)
on mac-mini-01-shell UJ4PyLUA_, system ID: s_7d041a37a510
Resolving secrets
Preparing the "shell" executor
Using Shell (bash) executor...
Preparing environment
Running on GT-XMPJYXMXYG...
Getting source from Git repository
Gitaly correlation ID: 01KEAZK0EAX3YDRWJ5CW16VRN4
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /Users/sysadmin/builds/UJ4PyLUA_/1/dev/install/.git/
Checking out 137b3b7f as detached HEAD (ref is refs/merge-requests/158/head)...
Skipping Git submodules setup
Executing "step_script" stage of the job script
$ echo "Repository checked out on host at $CI_PROJECT_DIR"
Repository checked out on host at /Users/sysadmin/builds/UJ4PyLUA_/1/dev/install
$ ls -la
total 112
drwxr-xr-x@ 19 sysadmin staff 608 Jan 6 20:01 .
drwxr-xr-x@ 4 sysadmin staff 128 Jan 6 19:58 ..
-rwxr-xr-x@ 1 sysadmin staff 8881 Jan 6 19:58 bootstrap.sh
Cleaning up project directory and file based variables
Job succeeded
```

Job 2 Output (Tart Runner – VM)
```
Running with gitlab-runner 18.7.1 (cc7f9277)
on mac-mini-01-tart bcpX4Y6CR, system ID: s_7d041a37a510
Resolving secrets
Preparing the "custom" executor
Using Custom executor with driver tart 1.27.0-d5c86bf...
Pulling the latest version of ghcr.io/cirruslabs/macos-tahoe-vanilla:latest...
Cloning and configuring a new VM...
Waiting for the VM to boot and be SSH-able...
Was able to SSH!
Mounting buildsdir on /var/tmp/builds...
VM is ready.
Preparing environment
Running on Manageds-Virtual-Machine.local...
Getting source from Git repository
Skipping Git repository setup
Skipping Git checkout
Skipping Git submodules setup
Executing "step_script" stage of the job script
WARNING: Starting with version 17.0 the 'build_script' stage will be replaced with 'step_script': https://gitlab.com/groups/gitlab-org/-/epics/6112
$ echo "CI_PROJECT_DIR=$CI_PROJECT_DIR"
CI_PROJECT_DIR=/var/tmp/builds/dev/install
$ ls -la "$CI_PROJECT_DIR"
total 2
drwxr-xr-x 2 admin staff 64 Jan 7 00:45 .
drwxr-xr-x 4 admin staff 128 Jan 7 00:45 ..
```

**Environment**

Host macOS
```
ProductName: macOS
ProductVersion: 26.2
```

Installed tools:
```
gitlab-runner 18.7.1
gitlab-tart-executor 1.27.0
```

Any clarification or examples would be greatly appreciated. Thanks!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the custom executor's config, prepare, run, and cleanup entry points named in the runner configuration, and trace how config_args handles --builds-dir before the VM reports its mount path. Compare the host checkout path with CI_PROJECT_DIR inside the VM; done means the intended shared repository behavior is implemented or the limitation is documented with a working configuration example.

Written by the indexing model from the issue text.

Assessment

Tech stack
gitlab, go
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.