client-dotnet/.gitlab-ci.yml

62 lines
1.4 KiB
YAML
Raw Normal View History

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.9.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
2021-02-21 16:25:37 +00:00
protobuf-lint:
stage: test
image:
name: docker.io/bufbuild/buf:latest
entrypoint: [""]
script:
- cd api/proto/
2021-02-21 16:25:37 +00:00
- buf ls-files
- buf lint
2021-02-22 14:10:34 +00:00
nuget-publish:
stage: release
only:
refs:
- tags
script:
- dotnet tool restore
2022-01-27 10:03:21 +00:00
- dotnet nuke NuGetPush --nuget-username "${NUGET_USERNAME}" --nuget-password "${NUGET_PASSWORD}"