jenkins
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -362,3 +362,4 @@ MigrationBackup/
|
|||||||
# Fody - auto-generated XML schema
|
# Fody - auto-generated XML schema
|
||||||
FodyWeavers.xsd
|
FodyWeavers.xsd
|
||||||
|
|
||||||
|
upstreamProjects/
|
||||||
@@ -1,42 +1,29 @@
|
|||||||
|
@Library('farmmaps-shared-library') _
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent any
|
agent any;
|
||||||
environment {
|
options {
|
||||||
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()
|
copyArtifactPermission projectNames: env.allProjectsArtifactPermission;
|
||||||
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}"
|
triggers {
|
||||||
|
upstream(
|
||||||
|
upstreamProjects: '/FarmMaps.Develop/Base.Core.Common.Geometry/develop',
|
||||||
|
threshold: hudson.model.Result.SUCCESS
|
||||||
|
)
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Dotnet Restore') {
|
stage('TaskBuildAll') {
|
||||||
steps {
|
steps {
|
||||||
sh '''dotnet restore CarbonLib.csproj'''
|
stepTaskBuildAll();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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 {
|
post {
|
||||||
|
success {
|
||||||
|
postSuccess();
|
||||||
|
}
|
||||||
always {
|
always {
|
||||||
emailext (
|
postAlways();
|
||||||
body: '${DEFAULT_CONTENT}',
|
|
||||||
mimeType: 'text/html',
|
|
||||||
replyTo: '${DEFAULT_REPLYTO}',
|
|
||||||
subject: '${DEFAULT_SUBJECT}',
|
|
||||||
to: emailextrecipients([[$class: 'CulpritsRecipientProvider'], [$class: 'RequesterRecipientProvider']])
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user