How to change the gitlab multi runner build path.
in my server it have /home/gitlab-runner/builds.
I want to change this path to my secondary HDD that is mounted in the same server.
Build Directory GitLab Runner clones the repository to a path that exists under a base path better known as the Builds Directory. The default location of this base directory depends on the executor. For: Kubernetes, Docker and Docker Machine executors, it is /builds inside of the container.
GitLab Runner configuration uses the TOML format. The file to be edited can be found in: /etc/gitlab-runner/config. toml on *nix systems when GitLab Runner is executed as root (this is also path for service configuration)
gitlab-ci. yml file at the root of your repository. This file is where you define your CI/CD jobs.
You can change your runners build path by adjusting the config.toml
. In the [[runners]]
section add or change the builds_dir
directory.
For further reference on runner configuration you can check out the documentation here.
On macOS I was able to find one more way (can be helpful if you have many runners, I guess):
Edit ~/Library/LaunchAgents/gitlab-runner.plist
and modify the path under --working-directory
to whatever you want
e.g. from Terminal
vim /Users/Me/Library/LaunchAgents/gitlab-runner.plist
or using your favorite Text Editor
Restart it for the changes to take effect
gitlab-runner restart
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With