0

I have a React.js project auto deployed on my digital ocean droplet using gitlab-runner, everything's working fine, but the project is always pulled on a long path, example :

/home/gitlab-runner/builds/FiRsT_ToKeN_ChAraCters/0/mygitlab_username/my_project_name

I have tried to change the build dir editing the config.toml file in: /etc/gitlab-runner, but it changes only the builds directory, i want my path to look like :

/home/gitlab-runner/customName/my_project_name

vvvvv
  • 25,404
  • 19
  • 49
  • 81
Achraf
  • 111
  • 8
  • What executor are you using for your runner? It sounds like you ma be using a shell runner, at which point multiple jobs needs to be differentiated by the job path. – Patrick Oct 09 '21 at 02:10
  • you are right, i'm using a shell executor – Achraf Oct 09 '21 at 09:31
  • You should maybe take a look at the feature [runners.custom_build_dir](https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnerscustom_build_dir-section). But I'm not sure will do what you're asking for. – Davide Madrisan Oct 09 '21 at 16:53
  • @AchrafBoutahar - you won't be able to get the clean build directory that you're looking for with a shell executor, only with a docker executor. The reason for this is that if the executor pulls down multiple jobs at a time, it needs to have a way of differentiating the root directories for each of those jobs. That's why you're getting the tokens and "0" in the path. If you need a clean directory, I'd recommend you use a docker executor. – Patrick Oct 09 '21 at 17:36

0 Answers0