From 2d79b5a0bf685d7ab6f9d8d92ed7815e0b1ed2c0 Mon Sep 17 00:00:00 2001 From: ThompsonNye Date: Fri, 23 Aug 2024 18:56:01 +0200 Subject: [PATCH] Revert "Replace with gitea actions" This reverts commit 70f47b0dd136d85d5cd8a561a50f5665bc9ab613. # Conflicts: # .gitea/workflows/build.yaml # vegasco-server.sln --- .drone.yml | 66 +++++++++++++++++++++++++++++++++++++ .gitea/workflows/build.yaml | 65 ------------------------------------ vegasco-server.sln | 7 +--- 3 files changed, 67 insertions(+), 71 deletions(-) create mode 100644 .drone.yml delete mode 100644 .gitea/workflows/build.yaml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..e84218b --- /dev/null +++ b/.drone.yml @@ -0,0 +1,66 @@ +kind: pipeline +type: docker +name: Pipeline + +trigger: + event: + include: + - push + - pull_request + - custom + +steps: + + - name: compile + image: mcr.microsoft.com/dotnet/sdk:8.0-alpine + environment: + CI_WORKSPACE: "/drone/src" + commands: + - dotnet build + volumes: + - name: dockersock + path: /var/run + + - name: test + image: quay.io/testcontainers/dind-drone-plugin + environment: + CI_WORKSPACE: "/drone/src" + settings: + build_image: mcr.microsoft.com/dotnet/sdk:8.0-alpine + cmd: + - dotnet test --no-build + volumes: + - name: dockersock + path: /var/run + depends_on: + - compile + + - name: Telegram notification + image: appleboy/drone-telegram + settings: + token: + from_secret: telegram_token + to: + from_secret: telegram_user_id + when: + status: + - success + - failure + depends_on: + - compile + - test + - docker build and push + - deploy to test + - deploy to prod + +services: + - name: docker + image: docker:dind + privileged: true + volumes: + - name: dockersock + path: /var/run + +volumes: + - name: dockersock + temp: { } diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml deleted file mode 100644 index d2ecb25..0000000 --- a/.gitea/workflows/build.yaml +++ /dev/null @@ -1,65 +0,0 @@ -name: Build Vegasco Server -on: - push: - pull_request: - workflow_run: - types: - - requested - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Install docker - uses: papodaca/install-docker-action@main - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - uses: actions/setup-dotnet@v4 - with: - dotnet-version: '8.x' - - - name: Check out repository code - uses: actions/checkout@v3 - - - name: Build - run: dotnet build - - - name: Test - run: dotnet test --filter FullyQualifiedName!~System - - ### Report via telegram - - - name: Get 8 characters of commit id - uses: bhowell2/github-substring-action@1.0.2 - id: commit-hash-short - if: ${{ always() }} - with: - value: ${{ gitea.event.commits[0].id }} - length_from_start: 8 - - - name: Clean commit message - uses: mad9000/actions-find-and-replace-string@3 - id: commit-message-clean - with: - source: ${{ gitea.event.commits[0].message }} - find: '\n' - replace: '' - - - name: Telegram notification - uses: appleboy/telegram-action@master - if: ${{ always() }} - env: - STATUS_ICON: ${{ job.status == 'success' && '✅' || job.status == 'failure' && '❌' || '❕' }} - with: - to: ${{ secrets.TELEGRAM_TO }} - token: ${{ secrets.TELEGRAM_TOKEN }} - format: markdown - message: | - ${{ env.STATUS_ICON }} Build #${{ gitea.run_number }} of `${{ gitea.repository }}`: ${{ job.status }} - - 📝 Commit by ${{ gitea.actor }} on `${{ gitea.ref_name }}`: - [${{ steps.commit-message-clean.outputs.value }} - ${{ steps.commit-hash-short.outputs.substring }}](${{ gitea.event.commits[0].url }}) - - 🌐 ${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }} diff --git a/vegasco-server.sln b/vegasco-server.sln index 7a363cd..30301fb 100644 --- a/vegasco-server.sln +++ b/vegasco-server.sln @@ -10,6 +10,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A16251C2-47DB-4017-812B-CA18B280E049}" ProjectSection(SolutionItems) = preProject README.md = README.md + .drone.yml = .drone.yml version.json = version.json EndProjectSection EndProject @@ -21,11 +22,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WebApi.Tests.Integration", EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebApi.Tests.System", "tests\WebApi.Tests.System\WebApi.Tests.System.csproj", "{21418359-4A20-4F4A-B26C-A75A2B70AA10}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "gitea_workflows", "gitea_workflows", "{B149FCA4-4FA0-4987-A451-75782BB0BD02}" - ProjectSection(SolutionItems) = preProject - .gitea\workflows\build.yaml = .gitea\workflows\build.yaml - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -57,7 +53,6 @@ Global {5BA94D65-1D04-49EA-B7CC-F3719DE2D97E} = {437DE053-1DAB-4EEF-BEA6-E3B5179692F8} {0B1F3D81-95E8-4CFC-8A90-8A3CB2549326} = {437DE053-1DAB-4EEF-BEA6-E3B5179692F8} {21418359-4A20-4F4A-B26C-A75A2B70AA10} = {437DE053-1DAB-4EEF-BEA6-E3B5179692F8} - {B149FCA4-4FA0-4987-A451-75782BB0BD02} = {A16251C2-47DB-4017-812B-CA18B280E049} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {7813E32D-AE19-479C-853B-063882D2D05A}