I want to automate my deployment process using gitlab-ci. I'm doing so manually via ssh at the moment. The steps are:
Build:
- dotnet restore
- dotnet publish
This leaves me with a directory full of .dlls. I want to deploy these to a docker container, so I run:
- docker build
- docker stop
- docker rm
- docker run
However, I'm having a hard time finding the proper way to do both in the same .gitlab.ci.yml file.
I need the dotnet tooling from microsoft/dotnet:latest and the docker cli tools from docker:latest.
I tried having two stages based on each of these images, but the output is not shared. To solve this, I tried using artifact, but that fails to upload.
I can't find any examples of this online, so I wonder if I'm doing something that shouldn't be done.