-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
50 lines (48 loc) · 1.42 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
41
42
43
44
45
46
47
48
49
50
properties(
[
buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '10')),
pipelineTriggers([pollSCM('0 H(5-6) * * *')])
]
)
pipeline
{
agent any
options {
skipDefaultCheckout true
}
stages
{
stage('Build'){
agent{ label "windows/buildtools2022" }
steps {
checkout scm
bat '''
call "C:/BuildTools/VC/Auxiliary/Build/vcvars64.bat"
nuget restore KodiLuncher.sln
msbuild KodiLuncher.sln /t:Rebuild /p:Configuration=Release;Platform="Any CPU" /flp:logfile=warnings.log;warningsonly
'''
stash includes: "warnings.log", name: "warningsFiles"
stash includes: '**/out/**/KodiLuncher.exe, **/out/**/KodiLuncher.pdb, **/out/**/*.dll', name: "bin"
}
}
stage('Compile check'){
steps {
script {
def warn = scanForIssues sourceCodeEncoding: 'UTF-8', tool: msBuild(id: 'msvc', pattern: 'warnings.log')
publishIssues failedTotalAll: 1, issues: [warn], name: 'Win compilation warnings'
}
}
}
stage('Archive'){
steps {
unstash "bin"
archiveArtifacts artifacts: '**', fingerprint: true, onlyIfSuccessful: true
}
}
}
post {
changed {
emailext body: 'Please go to ${env.BUILD_URL}', to: '${DEFAULT_RECIPIENTS}', subject: "Job ${env.JOB_NAME} (${env.BUILD_NUMBER}) ${currentBuild.currentResult}".replaceAll("%2F", "/")
}
}
}