Compare commits
17 Commits
refactored
...
dev-mkoebi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9da47f12d0 | ||
|
|
7fabc97d70 | ||
|
|
389f79f83f | ||
|
|
e0ab40c374 | ||
|
|
6fffa3d961 | ||
|
|
5c423f348d | ||
|
|
c6abfd98ce | ||
|
|
b266a527be | ||
| f720f37f09 | |||
| e4f2717423 | |||
| f758abbc21 | |||
| f98995332c | |||
| 2505c6ddcd | |||
| 818089917d | |||
| b6adf386f5 | |||
| f07d3e62a8 | |||
|
|
1beaca2622 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,6 +2,7 @@
|
||||
## Ignore Visual Studio temporary files, build results, and
|
||||
## files generated by popular Visual Studio add-ons.
|
||||
##
|
||||
##
|
||||
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||
|
||||
# User-specific files
|
||||
|
||||
35
Hochbaustatistik/config/Jenkinsfile
vendored
35
Hochbaustatistik/config/Jenkinsfile
vendored
@@ -4,7 +4,7 @@ pipeline
|
||||
{
|
||||
node
|
||||
{
|
||||
label 'Jenkins_Homer'
|
||||
label 'jenkins_homer_agent'
|
||||
}
|
||||
}
|
||||
stages
|
||||
@@ -14,17 +14,14 @@ pipeline
|
||||
environment
|
||||
{
|
||||
dotnet ="C:\\Program Files\\dotnet\\"
|
||||
scannerHome = "C:\\home\\jenkins\\tools\\hudson.plugins.sonar.MsBuildSQRunnerInstallation\\C_sonar-runner"
|
||||
token = 'sqa_71202f188aacbe40492ba767cf3e841179d3f41a'
|
||||
project = 'hochbaustatistik'
|
||||
|
||||
}
|
||||
steps
|
||||
{
|
||||
cleanWs()
|
||||
checkout scm
|
||||
bat "dotnet restore Hochbaustatistik\\Hochbaustatistik.sln"
|
||||
bat "${scannerHome}\\SonarScanner.MSBuild.exe begin /k:${project} /d:sonar.login=${token} /d:sonar.verbose=true /d:sonar.cs.opencover.reportsPaths=${WORKSPACE}\\coverage.xml"
|
||||
bat "\"${tool 'MSBuild17'}\" ${WORKSPACE}\\Hochbaustatistik\\Hochbaustatistik.sln /t:Restore /t:Rebuild /p:Configuration=Debug"
|
||||
bat "dotnet restore Hochbaustatistik.sln"
|
||||
bat "\"${tool 'MSBuild17'}\" ${WORKSPACE}\\Hochbaustatistik.sln /t:Restore /t:Rebuild /p:Configuration=Debug"
|
||||
}
|
||||
}
|
||||
stage('Test')
|
||||
@@ -37,7 +34,7 @@ pipeline
|
||||
{
|
||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE')
|
||||
{
|
||||
bat "dotnet test ${WORKSPACE}\\Hochbaustatistik\\Hochbaustatistik.Testing\\Hochbaustatistik.Testing.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=..\\..\\coverage.xml /p:Exclude=[Scan2Compress.GUI]*%2c[Scan2Compress.Properties]* --no-build"
|
||||
bat "dotnet test ${WORKSPACE}\\Hochbaustatistik.Testing\\Hochbaustatistik.Testing.csproj /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=..\\..\\coverage.xml /p:Exclude=[Scan2Compress.GUI]*%2c[Scan2Compress.Properties]* --no-build"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -45,31 +42,17 @@ pipeline
|
||||
{
|
||||
environment
|
||||
{
|
||||
scannerHome = "C:\\home\\jenkins\\tools\\hudson.plugins.sonar.MsBuildSQRunnerInstallation\\C_sonar-runner"
|
||||
token = 'sqa_a11eb81bb62f3777b11679484aee7e65ed739ef2'
|
||||
scannerHome = tool 'sonar-scanner4.4'
|
||||
project = 'hochbaustatistik'
|
||||
token = 'sqa_07d4e3802cf6283fc38a002e75bd0a5eb158af87'
|
||||
}
|
||||
steps
|
||||
{
|
||||
bat "${scannerHome}\\SonarScanner.MSBuild.exe end /d:sonar.login=${token}"
|
||||
}
|
||||
}
|
||||
stage('Coverage')
|
||||
withSonarQubeEnv('SonarQube_Homer')
|
||||
{
|
||||
environment
|
||||
{
|
||||
reportGen = "C:\\Nuget-Packages\\reportgenerator\\5.1.6\\tools\\net6.0\\ReportGenerator.exe"
|
||||
}
|
||||
steps
|
||||
{
|
||||
bat "${reportGen} -verbosity:Info -reports:${WORKSPACE}\\coverage.xml -targetdir:${WORKSPACE} -reporttypes:SonarQube;Cobertura;Html"
|
||||
bat "${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=${project} -Dsonar.login=${token}"
|
||||
}
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
|
||||
step([$class: 'CoberturaPublisher', autoUpdateHealth: false, autoUpdateStability: false, coberturaReportFile: '**/Cobertura.xml', failUnhealthy: false, failUnstable: false, maxNumberOfBuilds: 0, onlyStable: false, sourceEncoding: 'ASCII', zoomCoverageChart: false])
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user