Hi,
I’m using Gitlab’s shared windows workers, and need to run a database alongside to run tests. I think that is what services
is for.
Here’s a test job :
test-simplehttp:
tags:
- shared-windows
- windows-1809
- windows
stage: test
services:
# this is a dummy httpserver returning hello world, in real world that would be a custom postgres image
- name: strm/helloworld-http
alias: helloworld
script:
- wget http://helloworld
But it fails with The remote name could not be resolved
. I also tried with 127.0.0.1 instead of the host name, and with a windows image instead of a linux image.
From what I understand, shared windows worker run using the custom executor, and the docs says this supports gitlab-ci’s services.
So, here are my questions :
A/ Is it supposed to work ? From the logs, it looks like services
is completely ignored (no mention of the services).
B/ Alternatively, I could run the image in detached mode in my script (docker run -d -p 80:80 strm/helloworld-http
). But then, I clearly get docker: image operating system "linux" cannot be used on this platform
.
Cross-platform dockering works well on Windows desktop, isn’t there a way to get that working with gitlab’s shared windows workers ?
C/ Also, on the The Docker executor | GitLab, the top section makes me think it’s possible to run linux containers on windows. Is there a way to use the docker executor on a windows host with shared runners ?
For what it’s worth, here’s a test project.
Thanks a lot !!!
Olivier