Well, I created a private runner in my Digital Ocean VPS. This private runner is using shell executor, and this is my gitlab-ci.yml file:
variables:
VERSION_NAME: ${CI_COMMIT_REF_NAME}-${CI_CONCURRENT_ID}
before_script:
- docker info
stages:
- test
- build
- deploy
- delivery
test_project:
tags:
- safepark
stage: test
image: mcr.microsoft.com/dotnet/core/sdk:2.1
script:
- dotnet test
build_image:
tags:
- safepark
only:
- master
stage: build
script:
- docker build -f WebApi/Dockerfile -t myuser/myimage
- docker tag -t myuser/myimage myuser/myimage:${VERSION_NAME}
push_image:
tags:
- safepark
only:
- master
stage: deploy
script:
- docker push myuser/myimage
- docker push myuser/myimage:${VERSION_NAME}
But in "test" stage the image is never pulled and I got "dotnet command not found". But If I change to a shared runner everything works fine. Seems like "image" is ignored by gitlab runner. How can I solve it ?