From 980414b794155778559ddd51ae0c4acf7481e039 Mon Sep 17 00:00:00 2001 From: Peter Kurfer Date: Fri, 15 Sep 2023 19:40:34 +0200 Subject: [PATCH] ci: migrate to Drone CI --- .drone.yml | 24 ++++++++++++++++ .gitlab-ci.yml | 61 ----------------------------------------- .nuke/build.schema.json | 9 +++--- INetMock.sln | 1 - build/_build.csproj | 4 +++ 5 files changed, 33 insertions(+), 66 deletions(-) create mode 100644 .drone.yml delete mode 100644 .gitlab-ci.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..57701a7 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,24 @@ +--- +kind: pipeline +type: docker +name: default + +platform: + os: linux + arch: arm64 + +trigger: + branch: + - main + event: + - push + - pull_request + - tag + +steps: + - name: Test + image: mcr.microsoft.com/dotnet/sdk:6.0 + commands: + - dotnet tool restore + - dotnet restore + - dotnet nuke test diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 4de04ea..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,61 +0,0 @@ -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 diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json index 1828fb1..a311343 100644 --- a/.nuke/build.schema.json +++ b/.nuke/build.schema.json @@ -1,7 +1,7 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Build Schema", "$ref": "#/definitions/build", + "title": "Build Schema", "definitions": { "build": { "type": "object", @@ -29,6 +29,7 @@ "AppVeyor", "AzurePipelines", "Bamboo", + "Bitbucket", "Bitrise", "GitHubActions", "GitLab", @@ -38,8 +39,8 @@ "TeamCity", "Terminal", "TravisCI", - "VisualStudio", - "VSCode" + "VSCode", + "VisualStudio" ] }, "NoLogo": { @@ -116,4 +117,4 @@ } } } -} \ No newline at end of file +} diff --git a/INetMock.sln b/INetMock.sln index 4f156f3..57e7881 100644 --- a/INetMock.sln +++ b/INetMock.sln @@ -7,7 +7,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "SolutionItems", "SolutionIt ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig .gitignore = .gitignore - .gitlab-ci.yml = .gitlab-ci.yml .pre-commit-config.yaml = .pre-commit-config.yaml README.md = README.md global.json = global.json diff --git a/build/_build.csproj b/build/_build.csproj index 0dbad78..18299d1 100644 --- a/build/_build.csproj +++ b/build/_build.csproj @@ -17,4 +17,8 @@ + + + +