61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
image: mcr.microsoft.com/dotnet/sdk:6.0
|
|
|
|
stages:
|
|
- test
|
|
- release
|
|
|
|
variables:
|
|
DOCKER_TLS_CERTDIR: "/certs"
|
|
DOCKER_CERT_PATH: "/certs/client"
|
|
DOCKER_TLS_VERIFY: 1
|
|
DOCKER_HOST: 'tcp://docker:2376'
|
|
|
|
test:
|
|
stage: test
|
|
services:
|
|
- docker:dind
|
|
before_script:
|
|
- |
|
|
curl https://download.docker.com/linux/static/stable/x86_64/docker-20.10.14.tgz | tar -xzv -C /usr/local/
|
|
|
|
docker run --rm -d \
|
|
--cap-add CAP_NET_RAW \
|
|
--cap-add CAP_NET_ADMIN \
|
|
--cap-add CAP_NET_BIND_SERVICE \
|
|
-u root \
|
|
-p 6767:6767 \
|
|
-e INETMOCK_API_LISTEN=tcp://0.0.0.0:6767 \
|
|
--name inetmock \
|
|
registry.gitlab.com/inetmock/inetmock:latest
|
|
|
|
for i in `seq 1 10`
|
|
do
|
|
docker exec -i inetmock /usr/lib/inetmock/bin/imctl health container 2>&1 > /dev/null || sleep 1;
|
|
done;
|
|
after_script:
|
|
- docker stop inetmock
|
|
variables:
|
|
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/docker
|
|
INETMOCK_SOCKET: http://docker:6767
|
|
script:
|
|
- dotnet tool restore
|
|
- dotnet nuke Test
|
|
|
|
protobuf-lint:
|
|
stage: test
|
|
image:
|
|
name: docker.io/bufbuild/buf:latest
|
|
entrypoint: [""]
|
|
script:
|
|
- cd api/proto/
|
|
- buf ls-files
|
|
- buf lint
|
|
|
|
nuget-publish:
|
|
stage: release
|
|
only:
|
|
refs:
|
|
- tags
|
|
script:
|
|
- dotnet tool restore
|
|
- dotnet nuke NuGetPush
|