Skip to content

Commit

Permalink
Configure Jenkins and Sonar (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
joaoalves-kununu authored Apr 17, 2019
1 parent 62b9c12 commit 89b1222
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
@Library("kununu") _

withEnv([
"SERVICE_NAME=data-fixtures",
"LOG_JUNIT_EXPORT=tests/.results/tests-junit.xml",
"LOG_CLOVER_EXPORT=tests/.results/tests-clover.xml"
]) {
ansiColor {
timestamps {
defaultPipeline.getSource()
defaultPipeline.runPhpLibTests()
defaultPipeline.runSonar("php")

if (env.BRANCH_NAME in ["master"]) {
defaultPipeline.publishPhpPackage()
}
}
}
}
11 changes: 11 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
sonar.projectKey=library-data-fixtures
sonar.projectName=data-fixtures (Library)

sonar.sources=src

sonar.tests=tests

sonar.php.coverage.reportPath=tests/.results/tests-clover.xml
sonar.php.tests.reportPath=tests/.results/tests-junit.xml

sonar.coverage.exclusion=tests/**

0 comments on commit 89b1222

Please sign in to comment.