Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to change gitlab-ci runner build path

Tags:

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.

like image 693
Prem Anand Avatar asked Jan 25 '17 13:01

Prem Anand


People also ask

Where is gitlab runner build directory?

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.

Where is gitlab runner config toml file?

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)

Where is gitlab CI file?

gitlab-ci. yml file at the root of your repository. This file is where you define your CI/CD jobs.


2 Answers

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.

like image 144
Fairy Avatar answered Oct 02 '22 17:10

Fairy


On macOS I was able to find one more way (can be helpful if you have many runners, I guess):

  1. 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

  2. Restart it for the changes to take effect

    gitlab-runner restart

like image 43
RAM237 Avatar answered Oct 02 '22 15:10

RAM237