Make volumes to work on linux docker on windows
What does this MR do?
- Fix absolute path check when GitLab Runner is installed on Windows talking to a Linux Docker daemon
- Fix path manipulation/assertions when GitLab Runner is installed on Windows talking to Linux Docker daemon
Why was this MR needed?
When user run GitLab Runner on Windows and is talking to a Linux Docker daemon (think about docker for windows) the user gets the first error
build directory needs to be an absolute path this is because we are using
filepath to check if the path is absolute or not filepath is platform dependent so in this case it will check if
/builds is absolute for a Windows system which is not but is for Linux which is correct in our case since we are talking to Linux Docker daemon.
The same case goes for joining build directory which leads to an incorrect path and the git clone happening in the wrong place which results into the build failing still because we try to go the path that does not exist. For example below is the volume mounting destination difference:
In < 11.10.1:
"Destination": "/builds", & 11.11.0 you get
Are there points in the code the reviewer needs to double check?
Does this MR meet the acceptance criteria?
- Documentation created/updated
- Added tests for this feature/bug
In case of conflicts with
master- branch was rebased
What are the relevant issue numbers?
closes #4251 (closed)