-
Notifications
You must be signed in to change notification settings - Fork 22
/
Jenkinsfile
40 lines (39 loc) · 1.45 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
// -*- groovy -*-
pipeline {
agent {
label {
label 'windows-2019'
}
}
options {
timestamps()
buildDiscarder(logRotator(numToKeepStr: '10'))
timeout(time: 1, unit: 'HOURS')
}
stages {
stage('Build') {
steps {
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'
}
}
stage('Test') {
steps {
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'
}
}
stage('Nuget-pack') {
steps {
bat 'docker run --rm -v %cd%:C:/work -w C:/work/src -e TAG_NAME mcr.microsoft.com/dotnet/framework/sdk:4.8-20190910-windowsservercore-ltsc2019 powershell -File build.ps1 --target=Nuget-pack'
}
}
stage('Nuget-push') {
when { tag "*" }
environment {
NugetAPIKey = credentials('nuget-api-key')
}
steps {
bat 'docker run --rm -v %cd%:C:/work -w C:/work/src -e NugetAPIKey -e TAG_NAME mcr.microsoft.com/dotnet/framework/sdk:4.8-20190910-windowsservercore-ltsc2019 powershell -File build.ps1 --target=Nuget-push'
}
}
}
}