How to set correct build directory?

Hi, I was trying to get CI working but unfortunately I am always getting this message:

ERROR: Preparation failed: build directory needs to be absolute and non-root path
Will be retried in 3s …
ERROR: Build failed (system failure): build directory needs to be absolute and non-root path

I have Java maven project, I tried to modify .gitlab-ci.yml file to just print Hello World but without success. I was googling this message but I have found only gitlab source code - I got that my build directory is wrong obviously, but I have no idea how to correct it. Could you help me, please?

Thanks, Marek

did you find a fix?

Unfortunately, no. Maybe because I have project on https://gitlab.fi.muni.cz/ instead of https://gitlab.com/?

I was helped to switch runner to docker with docker-ssh

Has anyone acutally got any information on what the hell is the ‘build directory’. Most of my artifacts are being chucked away because they arent in the ‘build directory’ though no one seems to be bothered to say what the ****** is the build directory how to set up what the build directory is or why the place I am damned well building in is somehow not the build directory.
I guess this is another question that will be ignored and then closed.

@marek.sabo.gvpt would you be ok to share your gitlab-ci.yml ?

I encounter the same problem here, but it was ok before. I’m gonna upgrade my runner to see if the bug is from here.

The error message come from this line :

I still don’t understand, but I keep searching.

I am sorry @mdartic, I just reinstalled my computer; thus I don’t have the config file anymore. But I think it was similar to the sample Java configuration.

Good luck fixing your problem!

Well, doesn’t matter.

I was running my CI on an old gitlab-ci-multi-runner 9.5.1.

I update to gitlab-runner 10.8.0 and now it’s ok.

I think it was related to the fact it was an old runner.

Now it’s working !

1 Like