diff --git a/CarbonLib.csproj b/CarbonLib.csproj index aedeb8c..61231c5 100644 --- a/CarbonLib.csproj +++ b/CarbonLib.csproj @@ -8,12 +8,12 @@ false false false - 2.0.1 + 2.0.2 - - + + diff --git a/Jenkinsfile.develop b/Jenkinsfile.develop index 93b96b0..f163ccc 100644 --- a/Jenkinsfile.develop +++ b/Jenkinsfile.develop @@ -1,29 +1,42 @@ -@Library('farmmaps-shared-library') _ - pipeline { - agent any; - options { - copyArtifactPermission projectNames: env.allProjectsArtifactPermission; - } - triggers { - upstream( - upstreamProjects: '/FarmMaps.Develop/Base.Core.Common.Geometry/develop', - threshold: hudson.model.Result.SUCCESS - ) + agent any + environment { + APP_VERSION_PREFIX=sh(script: ' cat *.csproj| xmlstarlet sel -t -m "/Project/PropertyGroup/Version" -v . -n|awk -v def="1.0.0" "{print} END { if(NR==0) {print def} }"', returnStdout: true).trim() + APP_NAME=sh(script: ' cat *.csproj| xmlstarlet sel -t -m "/Project/PropertyGroup/AssemblyName" -v . -n|awk -v def="App" "{print tolower(\\$0)} END { if(NR==0) {print def} }"', returnStdout: true).trim() + APP_VERSION="${APP_VERSION_PREFIX + '-prerelease.' + env.BUILD_NUMBER}" } stages { - stage('BaseBuildAll') { + stage('Dotnet Restore') { steps { - stepBaseBuildAll(); + sh '''dotnet restore CarbonLib.csproj''' } } - } - post { - success { - postSuccess(); + stage('Dotnet Build'){ + steps { + sh '''dotnet build CarbonLib.csproj''' + } } + stage('Dotnet Package') { + steps { + sh '''rm -rf nuget + dotnet pack -c debug -o nuget -p:PackageVersion=${APP_VERSION} CarbonLib.csproj''' + } + } + stage('Dotnet Publish') { + steps { + sh '''dotnet nuget push nuget/*.nupkg -k 0c3e3afc-935b-3db1-b023-e0d4799e674d -s https://repository.akkerweb.nl/repository/nuget-hosted/''' + } + } + } + post { always { - postAlways(); + emailext ( + body: '${DEFAULT_CONTENT}', + mimeType: 'text/html', + replyTo: '${DEFAULT_REPLYTO}', + subject: '${DEFAULT_SUBJECT}', + to: emailextrecipients([[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']]) + ) } } } \ No newline at end of file