From bfa56418498cce1ac6118a412a4480d56cccfd86 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 22 Dec 2023 16:15:43 +0100 Subject: [PATCH] added new ci script --- .woodpecker/main.yml | 20 ++++++++++++++++++++ Jenkinsfile | 35 ----------------------------------- 2 files changed, 20 insertions(+), 35 deletions(-) create mode 100644 .woodpecker/main.yml delete mode 100644 Jenkinsfile diff --git a/.woodpecker/main.yml b/.woodpecker/main.yml new file mode 100644 index 0000000..667bc49 --- /dev/null +++ b/.woodpecker/main.yml @@ -0,0 +1,20 @@ +variables: + - &image mcr.microsoft.com/dotnet/sdk:8.0-jammy +steps: + build: + image: *image + commands: dotnet build + test: + image: *image + commands: dotnet test --collect:"XPlat Code Coverage" + pack: + image: *image + commands: dotnet pack --version-suffix $CI_PIPELINE_NUMBER + publish: + image: *image + when: + branch: main + event: push + commands: dotnet nuget push -s https://nuget.ellpeck.de/v3/index.json **/*.nupkg -k $BAGET_KEY -n + secrets: + - baget_key diff --git a/Jenkinsfile b/Jenkinsfile deleted file mode 100644 index ef25f0e..0000000 --- a/Jenkinsfile +++ /dev/null @@ -1,35 +0,0 @@ -pipeline { - agent any - stages { - stage('Test') { - steps { - sh 'dotnet test --collect:"XPlat Code Coverage"' - } - } - - stage('Pack') { - steps { - sh 'find . -type f -name "*.nupkg" -delete' - sh 'dotnet pack --version-suffix ${BUILD_NUMBER}' - } - } - - stage('Publish') { - when { - branch 'main' - } - steps { - sh 'dotnet nuget push -s https://nuget.ellpeck.de/v3/index.json **/*.nupkg -k $BAGET -n' - } - } - } - post { - always { - nunit testResultsPattern: '**/TestResults.xml' - cobertura coberturaReportFile: '**/coverage.cobertura.xml' - } - } - environment { - BAGET = credentials('3db850d0-e6b5-43d5-b607-d180f4eab676') - } -}