Skip to content

Commit

Permalink
Add sonarcloud.io execution to CI (incl. code coverage with jacoco) (#…
Browse files Browse the repository at this point in the history
…493)

This closes #492
  • Loading branch information
kwin committed Oct 16, 2020
1 parent 415a2ae commit a6b9d71
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,11 @@ language: java
jdk: oraclejdk8
# fixing broken build, see https://travis-ci.community/t/error-installing-oraclejdk8-expected-feature-release-number-in-range-of-9-to-14-but-got-8/3766/7
dist: trusty
script: mvn clean verify -B -Pcheck-dependencies
addons:
sonarcloud:
organization: "netcentric"
token:
secure: "UPYVz3yLfAtb0OzVJFNufchYXnD1LEWMy2YEOwYb6Tsm8xx8EcpKSHaSWEvwLTV810OgJ7np2uWfbLuQzQKLey5Rwa6tVLajSqmmbNTbWJ+I2dajOkPb45McEo8iIepd2RBZaKE9/o1vdIv+4X9HOB4Dw16pqHUdWW0Az6pH6SY4pL0vyB1FKzhaBEyb46vY1Gw/n6SVEkmKixmyXQPhXYizGJnlCfr6OxmPpg9U2kTRYb3eODBs874DC49CZmXM7lHsx/i8jgtxN3GbKKloIqDI2TDA3PM3zeSAnehh2W5g25lbeZrS6auS8zOmTudkYaI/K+UVHVt6Olxl9wAmDuDZcZg6PJohRac0km5KWoLsEPTJidWhYuRazxSwlqNQ6rgzS8qShVQAKRDLbaDOlnUadumilT9s85u22MoF4EPXNp47RSvtbwHwQVirjghQBw09ABRP6bHgW7MS1yOJ6ADQU72MoNG3NQ+kjDNcLR+zfV3R1wM+azGLcR3gxJLfybx/8eOxdmOdTgLiJwxhKU0/uIqbGtxs/Dey3T4esYGcxQJ4TbeYng3iIKVbYSTvLaRG1Elgdf0hZhUgvLE5eB2nSYDB71Z9ASnXc/HVU1m7g0cCI6AgeMhVprMDUUFPY6dQoj3NS9WVm0JYfD3yW4NpEr1hODtFGKXlZSYAWlg=" # encrypted value of your token
script:
# the following command line builds the project, runs the tests with coverage and then execute the SonarCloud analysis
- mvn clean verify sonar:sonar -B -Dsonar.projectKey=Netcentric_accesscontroltool -Pcheck-dependencies,coverage-report
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
[![Build Status](https://travis-ci.org/Netcentric/accesscontroltool.svg?branch=develop)](https://travis-ci.org/Netcentric/accesscontroltool) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/biz.netcentric.cq.tools.accesscontroltool/accesscontroltool/badge.svg)](https://maven-badges.herokuapp.com/maven-central/biz.netcentric.cq.tools.accesscontroltool/accesscontroltool) [![License](https://img.shields.io/badge/License-EPL%201.0-red.svg)](https://opensource.org/licenses/EPL-1.0)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/biz.netcentric.cq.tools.accesscontroltool/accesscontroltool/badge.svg)](https://maven-badges.herokuapp.com/maven-central/biz.netcentric.cq.tools.accesscontroltool/accesscontroltool)
[![License](https://img.shields.io/badge/License-EPL%201.0-red.svg)](https://opensource.org/licenses/EPL-1.0)
[![Build Status](https://travis-ci.org/Netcentric/accesscontroltool.svg?branch=develop)](https://travis-ci.org/Netcentric/accesscontroltool)
[![SonarCloud Status](https://sonarcloud.io/api/project_badges/measure?project=Netcentric_accesscontroltool&metric=alert_status)](https://sonarcloud.io/dashboard?id=Netcentric_accesscontroltool)
[![SonarCloud Coverage](https://sonarcloud.io/api/project_badges/measure?project=Netcentric_accesscontroltool&metric=coverage)](https://sonarcloud.io/component_measures/metric/coverage/list?id=Netcentric_accesscontroltool)

Access Control Tool for Adobe Experience Manager
================================================
Expand Down
27 changes: 26 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,6 @@
</plugins>
</build>
</profile>

<profile>
<id>dependency-check</id>
<build>
Expand Down Expand Up @@ -680,6 +679,32 @@
</plugins>
</build>
</profile>
<profile>
<id>coverage-report</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.6</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>

0 comments on commit a6b9d71

Please sign in to comment.