Skip to content
This repository was archived by the owner on May 27, 2026. It is now read-only.

Commit 303ac8a

Browse files
committed
Add Jenkinsfile
Signed-off-by: Stefan Scherer <stefan.scherer@docker.com>
1 parent d8bb2f6 commit 303ac8a

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

‎Jenkinsfile‎

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
// -*- groovy -*-
2+
3+
pipeline {
4+
agent {
5+
label {
6+
label 'windows-2019'
7+
}
8+
}
9+
options {
10+
timestamps()
11+
quietPeriod(600)
12+
buildDiscarder(logRotator(daysToKeepStr: '30'))
13+
preserveStashes()
14+
timeout(time: 1, unit: 'HOURS')
15+
}
16+
stages {
17+
stage('Build') {
18+
steps {
19+
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'
20+
}
21+
}
22+
stage('Test') {
23+
steps {
24+
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'
25+
}
26+
}
27+
stage('Nuget-pack') {
28+
steps {
29+
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'
30+
}
31+
}
32+
stage('Nuget-push') {
33+
when { tag "*" }
34+
environment {
35+
NugetAPIKey = credentials('nuget-api-key')
36+
}
37+
steps {
38+
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'
39+
}
40+
}
41+
}
42+
}

0 commit comments

Comments
 (0)