Change the path of /gcl-builds
Is your feature request related to a problem? Please describe. Is it possible to change the path of /gcl-builds ? I would like my path to be inside $HOME/my-project instead of /gcl-builds/
Is it possible to change to container path on remote gitlab runners?
Is it possible to change to container path on remote gitlab runners?
Yes with CI_BUILDS_DIR:
- docs: https://docs.gitlab.com/ee/ci/runners/configure_runners.html#custom-build-directories
- related issue: https://github.com/firecow/gitlab-ci-local/issues/1207
Very nice :+1: I'm marking as feature
Is it possible to change the path of /gcl-builds ? I would like my path to be inside $HOME/my-project instead of /gcl-builds/
what kind of executor are you using ? container or shell ?
if you're using container executor, what's the use case of customizing the CI_BUILD_DIR ?
if you're using shell executor, the default is your cwd not /gcl-builds
if you're using container executor, what's the use case of customizing the CI_BUILD_DIR ?
Not sure of the OP, but our use case is to standardizing the path between jobs for:
- stable paths between build and test jobs because CMake's generated CTest scripts assume the same absolute path (build and test jobs are separate so that tests can use CUDA resources without tying them up just to run compilers)
- stable paths for cluster-wide compiler cache cooperation
- at least one project needs longer paths so that rpath editing is reliable (if the build path isn't long enough,
$ORIGIN/-rewriting doesn't fit in the available space) - some projects ensure that the path has spaces to ensure that things work under such a directory
For clarity, we don't care so much about $CI_BUILDS_DIR itself, but that $GIT_CLONE_PATH is built from it and that is where the project lives.
@mathstuf is your request for shell-executor or container-executor ?
i don't really understand what you mean, i am not too familiar with CMake/CUDA ...
will be nice if you have a simple .gitlab-ci.yml example to illustrate ..
For clarity, we don't care so much about $CI_BUILDS_DIR itself, but that $GIT_CLONE_PATH is built from it and that is where the project lives.
I don't think gitlab.com currently supports this right ? For clarity, we don't care so much about $CI_BUILDS_DIR itself, but that $GIT_CLONE_PATH is built from it and that is where the project lives. (https://gitlab.com/gitlab-org/gitlab-runner/-/issues/25558)
We have self-hosted runners with runners.custom_build_dir.enabled = true. We use it with both shell and docker executors.
You can see how we do it here:
- Linux (
docker): https://gitlab.kitware.com/paraview/catalyst/-/blob/351d5406eeaad64983ffd0a6f5ffc40f8a14141d/.gitlab/os-linux.yml#L8 - macOS (
shell): https://gitlab.kitware.com/paraview/catalyst/-/blob/351d5406eeaad64983ffd0a6f5ffc40f8a14141d/.gitlab/os-macos.yml#L7-23 - Windows (
shell): https://gitlab.kitware.com/paraview/catalyst/-/blob/351d5406eeaad64983ffd0a6f5ffc40f8a14141d/.gitlab/os-windows.yml#L8-21