Skip to content
This repository was archived by the owner on Nov 29, 2021. It is now read-only.

Commit 068345b

Browse files
committed
Add code coverage to Sonar
1 parent aeeb76a commit 068345b

File tree

4 files changed

+32
-15
lines changed

4 files changed

+32
-15
lines changed

.buildkite/pipeline.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ if-our-repo: &if-our-repo
55
if: pipeline.repository =~ /^https:\/\/github.com\/everest-engineering\//
66

77
steps:
8-
- label: ':hammer: build & test'
8+
- label: ':hammer: Build & test'
99
agents:
1010
java: 11
1111
commands:
@@ -16,7 +16,7 @@ steps:
1616
agents:
1717
java: 11
1818
commands:
19-
- ./gradlew sonarqube
19+
- ./gradlew sonarqube --console plain
2020

2121
- wait:
2222
<<: *if-release
@@ -29,4 +29,3 @@ steps:
2929
commands:
3030
- git fetch --tags
3131
- ./gradlew bintrayPublish bintrayUpload --console plain
32-

build.gradle

Lines changed: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@ plugins {
55
id 'maven-publish'
66
id 'com.jfrog.bintray' version '1.8.4'
77
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
8-
id "org.sonarqube" version "3.1.1"
9-
8+
id 'com.github.jk1.dependency-license-report' version '1.14'
9+
id 'org.sonarqube' version '3.1.1'
10+
id 'jacoco'
1011
}
1112

1213
apply plugin: 'io.freefair.lombok'
@@ -56,14 +57,6 @@ dependencies {
5657
testImplementation "org.springframework.security:spring-security-test"
5758
}
5859

59-
sonarqube {
60-
properties {
61-
property "sonar.projectKey", "everest-engineering_lhotse-security"
62-
property "sonar.organization", "everestengineering"
63-
property "sonar.host.url", "https://sonarcloud.io"
64-
}
65-
}
66-
6760
bintray {
6861
user = System.getenv('BINTRAY_USER')
6962
key = System.getenv('BINTRAY_KEY')
@@ -73,7 +66,7 @@ bintray {
7366
name = rootProject.name
7467
userOrg = 'everestengineering'
7568
licenses = ['Apache-2.0']
76-
vcsUrl = 'https://github.com/everestengineering/starterkit-storage'
69+
vcsUrl = 'https://github.com/everestengineering/starterkit-security'
7770
}
7871
publish = true
7972
}
@@ -85,3 +78,26 @@ publishing {
8578
}
8679
}
8780
}
81+
82+
jacocoTestReport {
83+
reports {
84+
xml.enabled true
85+
csv.enabled false
86+
html.enabled true
87+
}
88+
}
89+
90+
test.finalizedBy jacocoTestReport
91+
92+
sonarqube {
93+
properties {
94+
property "sonar.projectName", "Lhotse - security"
95+
property "sonar.projectKey", "everest-engineering_lhotse-security"
96+
property "sonar.organization", "everestengineering"
97+
property "sonar.host.url", "https://sonarcloud.io"
98+
property 'sonar.test.exclusions', '**/*Test.java'
99+
}
100+
}
101+
102+
tasks['sonarqube'].dependsOn test
103+

lombok.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# This file is generated by the 'io.freefair.lombok' Gradle plugin
22
config.stopBubbling = true
33
lombok.log.fieldName = LOGGER
4+
lombok.addLombokGeneratedAnnotation = true
5+

settings.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
rootProject.name = 'lhotse-security'
1+
rootProject.name = 'security'

0 commit comments

Comments
 (0)