Skip to content

WIP: Fix absolute path check for Windows Desktop

Steve Xuereb requested to merge 4251-fix-windows-for-linux-containers into master

What does this MR do?

Fix absolute path check for Windows Desktop

Why was this MR needed?

filepath is being used to check if the path is absolute or not. This fails in a scenario where GitLab Runner is running on Windows 10 and talking to a Docker daemon running Linux containers.

Testing

GitLab Runner on Linux talking to Windows Docker Daemon

job log
[0KRunning with gitlab-runner development version (HEAD)
[0;m[0K  on mac-to-windows-docker 3wd9Rqa9
[0;msection_start:1558523100:prepare_executor
[0K[0KUsing Docker executor with image mcr.microsoft.com/windows/servercore:1809 ...
[0;m[31;1mERROR: Preparation failed: Error response from daemon: Unrecognised volume spec: invalid volume specification: 'C:/builds/root/ci-scratch-pad/c:\cache' (cache_container.go:99:0s)
[0;m[32;1mWill be retried in 3s ...
[0;m[0KUsing Docker executor with image mcr.microsoft.com/windows/servercore:1809 ...
[0;m[31;1mERROR: Preparation failed: Error response from daemon: Unrecognised volume spec: invalid volume specification: 'C:/builds/root/ci-scratch-pad/c:\cache' (cache_container.go:99:0s)
[0;m[32;1mWill be retried in 3s ...
[0;m[0KUsing Docker executor with image mcr.microsoft.com/windows/servercore:1809 ...
[0;m[31;1mERROR: Preparation failed: Error response from daemon: Unrecognised volume spec: invalid volume specification: 'C:/builds/root/ci-scratch-pad/c:\cache' (cache_container.go:99:0s)
[0;m[32;1mWill be retried in 3s ...
[0;msection_end:1558523109:prepare_executor
[0K[31;1mERROR: Job failed (system failure): Error response from daemon: Unrecognised volume spec: invalid volume specification: 'C:/builds/root/ci-scratch-pad/c:\cache' (cache_container.go:99:0s)
[0;m

Ignore the error invalid volume specification this is a separate bug that we will have to fix in this scenario.

GitLab Runner on Windows Talking to Linux Docker Daemon

job log
Running with gitlab-runner 11.12.0~beta.1479.gfa38cc01 (fa38cc01)
  on windows-10 bdzF9f-8
Using Docker executor with image alpine:3.9 ...
WARNING: DEPRECATION: With gitlab-runner 12.0 we will change some tools inside the helper image, please make sure your image is compliant with the new API. https://gitlab.com/gitlab-org/gitlab-runner/issues/4013
Pulling docker image gitlab/gitlab-runner-helper:x86_64-latest ...
Using docker image sha256:a5e349c839d9b0ef2ef4191c00afacc79c4f66a086d31680e75c275b70bc316f for gitlab/gitlab-runner-helper:x86_64-latest ...
Starting service postgres:latest ...
Pulling docker image postgres:latest ...
Using docker image sha256:587aa1d0e58645b9709bb72a9886faf7d6627a3e07af20aded79d27f1dc0e79c for postgres:latest ...
WARNING: Possibly zombie container runner-bdzF9f-8-project-28-concurrent-0-postgres-0 is disconnected from network bridge
Waiting for services to be up and running...
WARNING: DEPRECATION: With gitlab-runner 12.0 we will change some tools inside the helper image, please make sure your image is compliant with the new API. https://gitlab.com/gitlab-org/gitlab-runner/issues/4013
WARNING: DEPRECATION: With gitlab-runner 12.0 we will change some tools inside the helper image, please make sure your image is compliant with the new API. https://gitlab.com/gitlab-org/gitlab-runner/issues/4013
Pulling docker image alpine:3.9 ...
Using docker image sha256:055936d3920576da37aa9bc460d70c5f212028bda1c08c0879aedf03d7a66ea1 for alpine:3.9 ...
WARNING: DEPRECATION: With gitlab-runner 12.0 we will change some tools inside the helper image, please make sure your image is compliant with the new API. https://gitlab.com/gitlab-org/gitlab-runner/issues/4013
Running on runner-bdzF9f-8-project-28-concurrent-0 via STEVEAZZOPAE19D...
WARNING: DEPRECATION: With gitlab-runner 12.0 we will change some tools inside the helper image, please make sure your image is compliant with the new API. https://gitlab.com/gitlab-org/gitlab-runner/issues/4013
Initialized empty Git repository in /builds/root/ci-scratch-pad/.git/
Fetching changes...
Created fresh repository.
From http://192.168.1.79:3000/root/ci-scratch-pad
 * [new branch]      4250                    -> origin/4250
 * [new branch]      cache                   -> origin/cache
 * [new branch]      custom-project-dir      -> origin/custom-project-dir
 * [new branch]      dirty-repo              -> origin/dirty-repo
 * [new branch]      forever-build           -> origin/forever-build
 * [new branch]      git-log                 -> origin/git-log
 * [new branch]      master                  -> origin/master
 * [new branch]      multiline-script        -> origin/multiline-script
 * [new branch]      scripts                 -> origin/scripts
 * [new branch]      services                -> origin/services
 * [new branch]      windows-docker-executor -> origin/windows-docker-executor
Checking out b5cbf1ca as master...

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)

Edited by Steve Xuereb

Merge request reports