This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mvn clean install sonar:sonar |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <project.test.result.directory>${project.build.directory}/test-results</project.test.result.directory> | |
| <sonar.host.url>http://localhost:9000</sonar.host.url> | |
| <sonar.scm.provider>git</sonar.scm.provider> | |
| <sonar.java.codeCoveragePlugin>jacoco</sonar.java.codeCoveragePlugin> | |
| <sonar.coverage.jacoco.xmlReportPaths>${project.test.result.directory}/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths> | |
| <sonar.exclusions> | |
| **/*.xml | |
| </sonar.exclusions> | |
| <sonar.coverage.exclusions> | |
| **/qualitymeasurementsample/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <plugin> | |
| <groupId>org.apache.maven.plugins</groupId> | |
| <artifactId>maven-surefire-plugin</artifactId> | |
| <version>3.0.0-M4</version> | |
| <configuration> | |
| <argLine>${jacocoArgLine}</argLine> | |
| <reportsDirectory>${project.test.result.directory}/surefire</reportsDirectory> | |
| </configuration> | |
| </plugin> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <plugin> | |
| <groupId>org.jacoco</groupId> | |
| <artifactId>jacoco-maven-plugin</artifactId> | |
| <version>0.8.5</version> | |
| <executions> | |
| <execution> | |
| <id>pre-test</id> | |
| <goals> | |
| <goal>prepare-agent</goal> | |
| </goals> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <plugin> | |
| <groupId>org.sonarsource.scanner.maven</groupId> | |
| <artifactId>sonar-maven-plugin</artifactId> | |
| <version>3.7.0.1746</version> | |
| </plugin> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @RestController | |
| @RequestMapping("test") | |
| public class TestController { | |
| private static final String TEST_MESSAGE = "Hello Sonar!"; | |
| @GetMapping | |
| public String getTestMessage() { | |
| return TEST_MESSAGE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server.port=8888 | |
| spring.cloud.config.server.git.uri=ssh://localhost/config-repo | |
| spring.cloud.config.server.git.clone-on-start=true | |
| spring.security.user.name=root | |
| spring.security.user.password=s3cr3t |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: ${CI_PROJECT_NAME}-deployment | |
| namespace: mpc | |
| spec: | |
| replicas: ${REPLICA} | |
| template: | |
| spec: | |
| containers: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apiVersion: v1 | |
| kind: ConfigMap | |
| metadata: | |
| name: ${CI_PROJECT_NAME}-config | |
| namespace: mpc | |
| data: | |
| config.sample.url: 'http://sample-url.com' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @SpringBootApplication | |
| @RestController | |
| public class ConfigClient { | |
| @Value("${user.role}") | |
| private String role; | |
| public static void main(String[] args) { | |
| SpringApplication.run(ConfigClient.class, args); | |
| } |