-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
43 lines (43 loc) · 1.14 KB
/
Jenkinsfile
File metadata and controls
43 lines (43 loc) · 1.14 KB
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
pipeline {
agent any
environment {
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT = 1
}
tools {
dotnetsdk 'dotnet8'
}
stages {
stage('Pre-Build') {
steps {
dotnetRestore()
}
}
stage('Build') {
steps {
dotnetBuild()
}
}
stage('Sonar') {
environment {
scannerHome = tool 'SonarScanner for MSBuild'
}
steps {
withSonarQubeEnv('SonarQube Community') {
sh "dotnet ${scannerHome}/SonarScanner.MSBuild.dll begin /k:'leosac_base-worker_e555830b-5ac4-482d-9d2c-33b2db819b66'"
dotnetBuild()
sh "dotnet ${scannerHome}/SonarScanner.MSBuild.dll end"
}
timeout(time: 1, unit: 'HOURS') {
waitForQualityGate(abortPipeline: true)
}
}
when {
anyOf {
branch 'main'
buildingTag()
changeRequest()
}
}
}
}
}