Search code examples
gitlab-cigitlab-ci-runner

gitlab-runner build directory location does not respect the LaunchAgent (macos)


I have set up the toy multijob as shown in the DAG pipelines. I have updated my LaunchAgent plist to point to a specific build directory: /Users/me/Documents/GitLabCI/. The first job in the multijob runs in this directory. The rest of the jobs always build in /Users/me/.

How do I get gitlab-runner to respect the build directory?


Solution

  • LaunchAgent is no longer respected by gitlab-runner. Instead you have to do the following:

    1. Add a variables: GIT_CLONE_PATH = $CI_BUILDS_DIR to your .gitlab-ci.yml file;
    2. Add a value builds_dir = "path/to/build/dir" under the [[runners]] section in your config.toml.
    3. Stop & restart gitlab-runner.