From e53d76d993cf64087444511c08666cf6dee280ef Mon Sep 17 00:00:00 2001 From: Jianlin Lv Date: Tue, 3 Dec 2019 10:52:06 +0800 Subject: [PATCH] Add Sonarcloud scans for IEC Setup gerrit-sonar job in JJB that scan golang file of IEC Signed-off-by: Jianlin Lv Change-Id: I7742e0146a342620dfb38e4fd20d3739a889c227 --- jjb/iec/iec.yaml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/jjb/iec/iec.yaml b/jjb/iec/iec.yaml index 86752e1..a0e179f 100644 --- a/jjb/iec/iec.yaml +++ b/jjb/iec/iec.yaml @@ -73,6 +73,42 @@ - 'iec-{iecType}-deploy-{installer}-{deploy_type}-{os}-daily-{stream}' - 'iec-{iecType}-destroy-{installer}-{deploy_type}-{os}-daily-{stream}' - 'iec-{iecType}-install-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}' + - gerrit-sonar: + sonar-project-file: "" + build-node: centos7-builder-2c-1g + sonar-properties: | + # Required metadata + sonar.projectKey=iec + sonar.projectName=iec + sonar.organization=akraino-edge-stack + + #Source + sonar.sources=. + sonar.exclusions=**/*_test.go,**/vendor/** + + # Language + sonar.language=go + + # Encoding + sonar.build.sourceEncoding=UTF-8 + + # Inclusions + sonar.inclusions=**/**.go + + # Test Execution + sonar.tests=. + sonar.test.inclusions=**/*_test.go + sonar.test.exclusions=**/vendor/** + + # Unit tests + sonar.go.coverage.reportPaths=iec-coverage.xml + sonar.go.tests.reportPaths=iec-tests.xml + + # Importing External Issues + sonar.go.govet.reportPaths=iec-govet.xml + sonar.go.golint.reportPaths=iec-golint.xml + sonar.go.gometalinter.reportPaths=iec-gometalinter.xml + sonar.go.golangci-lint.reportPaths=iec-golangci-lint.xml ############## # PARAMETERS # @@ -370,6 +406,7 @@ publishers: *publishers + ######################## # trigger macros ######################## -- 2.16.6