Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gitlab-runner errors on local windows

I am trying to generate my work in progress hugo website locally. It works fine with gitlab CI.

I installed docker and the gitlab runner service.

Then using the guide here I figured that I am supposed to do gitlab-runner exec docker pages. But that results in:

[0;33mWARNING: Since GitLab Runner 10.0 this command is marked as DEPRECATED and will be removed in one of upcoming releases[0;m
[0KRunning with gitlab-runner 10.5.0 (80b03db9)
[0;m[0KUsing Docker executor with image rocker/tidyverse:latest ...
[0;m[0KPulling docker image rocker/tidyverse:latest ...
[0;m[0KUsing docker image sha256:f9a62417cb9b800a07695f86027801d8dfa34552c621738a80f5fed649c1bc80 for rocker/tidyverse:latest ...
[0;m[31;1mERROR: Job failed (system failure): Error response from daemon: invalid volume specification: '/host_mnt/c/builds/project-0/Users/jan/Desktop/gits/stanstrup-web:C:\Users\jan\Desktop\gits\stanstrup-web:ro'
[0;m[31;1mFATAL: Error response from daemon: invalid volume specification: '/host_mnt/c/builds/project-0/Users/jan/Desktop/gits/stanstrup-web:C:\Users\jan\Desktop\gits\stanstrup-web:ro'[0;m

I also tried registering it as other guides show but I end up with the same issue.

Others have had some issues:

  • https://gitlab.com/gitlab-org/gitlab-runner/issues/1775 It was said it was fixed...
  • https://github.com/moby/moby/issues/12751 suggest that you can set COMPOSE_CONVERT_WINDOWS_PATHS=1. I tried setting that as an environmental variable but it didn't help.
  • More discussion of how to escape the path correctly: https://github.com/docker/compose/issues/3285
  • More discussion sugestion COMPOSE_CONVERT_WINDOWS_PATHS=1 would work: https://github.com/docker/toolbox/issues/607

Am I supposed to set something in .gitlab-ci.yml? Should volumes be set there? In which case how/where?



The .gitlab-ci.yml says:

image: rocker/tidyverse:latest

before_script:
  - apt-get update && apt-get -y install default-jdk pandoc r-base r-cran-rjava curl netcdf-bin libnetcdf-dev libxml2-dev libssl-dev
  - R CMD javareconf
  - Rscript .gitlab-ci.R

pages:
  script:
    - R -e "blogdown::build_site()"
  artifacts:
    paths:
      - public
  only:
    - master
like image 330
Jan Stanstrup Avatar asked Mar 08 '18 20:03

Jan Stanstrup


People also ask

Can I run GitLab on Windows?

GitLab itself cannot be installed on a Windows server, but you can use a GitLab Runner to access an existing GitLab installation on a Linux server from Windows. This software is installed in Windows and is compatible with the continuous integration functionality of GitLab (GitLab CI/CD).

How do I remove GitLab runner from Windows?

To do this, open the Command Prompt as shown below. Browse to the following location where the executable resides: C:\GitLab-Runner . – Run the command GitLab-runner stop (This will ensure the service stops running). As you can see above, you can now choose to delete the folder in which the GitLab-Runner resided.


1 Answers

Looks like you hit the colon seperator bug in docker for windows which lots of tools have to work around , gitlab has noticed it

until the fix comes out the simplest workaround would be for you to try doing this in a linux vm on your windows box. get prebuilt gitlab vm images from bitnami here.

otherwise you could checkout and run the gitlab-runner source branch with the fix, however it shows some conflicts and might have other bugs.

like image 70
Amias Avatar answered Oct 06 '22 14:10

Amias