Skip to content

Commit 56844a9

Browse files
Merge pull request #22 from StefanScherer/add-jenkinsfile
[DESKTOP-1894] Add Jenkinsfile
2 parents 63f6ed3 + b5db7ee commit 56844a9

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

Jenkinsfile

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// -*- groovy -*-
2+
3+
pipeline {
4+
agent {
5+
label {
6+
label 'windows-2019'
7+
}
8+
}
9+
options {
10+
timestamps()
11+
buildDiscarder(logRotator(numToKeepStr: '10'))
12+
timeout(time: 1, unit: 'HOURS')
13+
}
14+
stages {
15+
stage('Build') {
16+
steps {
17+
bat 'docker run --rm -v %cd%:C:/work -w C:/work/src mcr.microsoft.com/dotnet/framework/sdk:4.8-20190910-windowsservercore-ltsc2019 powershell -File build.ps1 -Target Build'
18+
}
19+
}
20+
stage('Test') {
21+
steps {
22+
bat 'docker run --rm -v %cd%:C:/work -w C:/work/src mcr.microsoft.com/dotnet/framework/sdk:4.8-20190910-windowsservercore-ltsc2019 powershell -File build.ps1 -Target Test'
23+
}
24+
}
25+
stage('Nuget-pack') {
26+
steps {
27+
bat 'docker run --rm -v %cd%:C:/work -w C:/work/src mcr.microsoft.com/dotnet/framework/sdk:4.8-20190910-windowsservercore-ltsc2019 powershell -File build.ps1 -Target Nuget-pack'
28+
}
29+
}
30+
stage('Nuget-push') {
31+
when { tag "*" }
32+
environment {
33+
NugetAPIKey = credentials('nuget-api-key')
34+
}
35+
steps {
36+
bat 'docker run --rm -v %cd%:C:/work -w C:/work/src mcr.microsoft.com/dotnet/framework/sdk:4.8 powershell -File build.ps1 -Target Nuget-push'
37+
}
38+
}
39+
}
40+
}

0 commit comments

Comments
 (0)