Skip to content
Snippets Groups Projects
Commit 269f1515 authored by OZGCloud's avatar OZGCloud
Browse files

add sonarqube

parent 653ed0a5
No related branches found
No related tags found
No related merge requests found
......@@ -39,13 +39,19 @@ pipeline {
}
sh 'npm run ci-test'
if (env.BRANCH_NAME == 'master') {
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'npm run ci-sonar'
}
}
}
}
}
}
post {
always{
junit testResults: 'goofy-client/junit.xml', skipPublishingChecks: true
junit testResults: 'goofy-client/test-report.xml', skipPublishingChecks: true
}
}
}
......@@ -60,6 +66,16 @@ pipeline {
sh 'mvn --version'
sh 'mvn -s $MAVEN_SETTINGS -pl -goofy-client clean install spring-boot:build-image -Dmaven.wagon.http.retryHandler.count=3'
}
script {
if (env.BRANCH_NAME == 'master') {
dir('goofy-server'){
withSonarQubeEnv('sonarqube-ozg-sh'){
sh 'mvn sonar:sonar'
}
}
}
}
}
}
post {
......
......@@ -15,7 +15,7 @@
"test:debug:lib": "run-s \"ng -- test {1} --detectOpenHandles --watchAll\" --",
"ci-build": "ng build --outputHashing=all",
"ci-prodBuild": "ng build --prod --outputHashing=all --prod",
"ci-test": "jest test a --ci --testResultsProcessor='jest-junit'",
"ci-test": "node --expose-gc ./node_modules/.bin/jest --ci --testResultsProcessor='jest-sonar-reporter' --logHeapUsage",
"ci-sonar": "sonar-scanner",
"lint": "nx workspace-lint && ng lint",
"affected:apps": "nx affected:apps",
......@@ -43,7 +43,7 @@
"cypress:generate-report": "npm run cypress:merge-report ; npm run cypress:generate-html",
"cypress:ci-run": "npm run cypress:delete-old-reports ; npm run cypress:run -- --config-file ./cypress-ci.json ; test=$(echo \"$?\") ; npm run cypress:pre-merge ; npm run cypress:generate-report ; exit $test",
"workspace-generator": "nx workspace-generator",
"sonar-scanner": "jest test a --coverage --testResultsProcessor='jest-sonar-reporter' && sonar-scanner -Dsonar.host.url=https://sonarqube.ozg-sh.de/ -Dsonar.login=25dfb9ee83a79b0f4af445c63405651fcf391ee8"
"sonar-scanner": "npm test -- --testResultsProcessor='jest-sonar-reporter' && sonar-scanner -Dsonar.host.url=https://sonarqube.ozg-sh.de/ -Dsonar.login=364c6e09430714838730a83f55d3369a7ffda0e9"
},
"private": true,
"dependencies": {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment