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
|
## Ignore Visual Studio temporary files, build results, and
|
||||||
## files generated by popular Visual Studio add-ons.
|
## files generated by popular Visual Studio add-ons.
|
||||||
##
|
##
|
||||||
|
##
|
||||||
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
|
||||||
|
|
||||||
# User-specific files
|
# User-specific files
|
||||||
|
|||||||
57
Hochbaustatistik/config/Jenkinsfile
vendored
57
Hochbaustatistik/config/Jenkinsfile
vendored
@@ -4,7 +4,7 @@ pipeline
|
|||||||
{
|
{
|
||||||
node
|
node
|
||||||
{
|
{
|
||||||
label 'Jenkins_Homer'
|
label 'jenkins_homer_agent'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stages
|
stages
|
||||||
@@ -14,17 +14,14 @@ pipeline
|
|||||||
environment
|
environment
|
||||||
{
|
{
|
||||||
dotnet ="C:\\Program Files\\dotnet\\"
|
dotnet ="C:\\Program Files\\dotnet\\"
|
||||||
scannerHome = "C:\\home\\jenkins\\tools\\hudson.plugins.sonar.MsBuildSQRunnerInstallation\\C_sonar-runner"
|
|
||||||
token = 'sqa_71202f188aacbe40492ba767cf3e841179d3f41a'
|
|
||||||
project = 'hochbaustatistik'
|
|
||||||
}
|
}
|
||||||
steps
|
steps
|
||||||
{
|
{
|
||||||
cleanWs()
|
cleanWs()
|
||||||
checkout scm
|
checkout scm
|
||||||
bat "dotnet restore Hochbaustatistik\\Hochbaustatistik.sln"
|
bat "dotnet restore 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.sln /t:Restore /t:Rebuild /p:Configuration=Debug"
|
||||||
bat "\"${tool 'MSBuild17'}\" ${WORKSPACE}\\Hochbaustatistik\\Hochbaustatistik.sln /t:Restore /t:Rebuild /p:Configuration=Debug"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('Test')
|
stage('Test')
|
||||||
@@ -37,39 +34,25 @@ pipeline
|
|||||||
{
|
{
|
||||||
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE')
|
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"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage('SonarQube')
|
stage('SonarQube')
|
||||||
{
|
{
|
||||||
environment
|
environment
|
||||||
{
|
{
|
||||||
scannerHome = "C:\\home\\jenkins\\tools\\hudson.plugins.sonar.MsBuildSQRunnerInstallation\\C_sonar-runner"
|
scannerHome = tool 'sonar-scanner4.4'
|
||||||
token = 'sqa_a11eb81bb62f3777b11679484aee7e65ed739ef2'
|
project = 'hochbaustatistik'
|
||||||
project = 'hochbaustatistik'
|
token = 'sqa_07d4e3802cf6283fc38a002e75bd0a5eb158af87'
|
||||||
}
|
}
|
||||||
steps
|
steps
|
||||||
{
|
{
|
||||||
bat "${scannerHome}\\SonarScanner.MSBuild.exe end /d:sonar.login=${token}"
|
withSonarQubeEnv('SonarQube_Homer')
|
||||||
}
|
{
|
||||||
}
|
bat "${scannerHome}/bin/sonar-scanner -Dsonar.projectKey=${project} -Dsonar.login=${token}"
|
||||||
stage('Coverage')
|
}
|
||||||
{
|
}
|
||||||
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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
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