Skip to content
Snippets Groups Projects
Commit 9151e2c8 authored by Emmanuel Bruno's avatar Emmanuel Bruno
Browse files

improves sonar plugins.

parent 5258de6c
No related branches found
No related tags found
No related merge requests found
......@@ -19,9 +19,9 @@ jobs:
- uses: actions/checkout@v2
- name: Build the Docker image for branch ${GITHUB_REF##*/}
run: DOCKER_BUILDKIT=1 docker build . \
--env GITHUBLOGIN="$GITHUBLOGIN" \
--env GITHUBPASSWORD="$GITHUBPASSWORD" \
--env SONAR_HOST="$SONAR_HOST" \
--env SONAR_TOKEN="$SONAR_TOKEN" \
--build-arg GITHUBLOGIN \
--build-arg GITHUBPASSWORD \
--build-arg SONAR_URL \
--build-arg SONAR_TOKEN \
--file ./docker/Dockerfile \
--tag brunoe/samplejee91:${GITHUB_REF##*/}
......@@ -5,7 +5,7 @@ services:
args:
- GITHUBLOGIN
- GITHUBPASSWORD
- SONAR_HOST
- SONAR_URL
- SONAR_TOKEN
context: .
dockerfile: docker/Dockerfile
......
### First we build the application in docker in a controlled env
FROM maven:3.8.4-eclipse-temurin-11 as build
ARG GITHUBLOGIN
ARG GITHUBPASSWORD
ARG SONAR_HOST
ARG SONAR_TOKEN
WORKDIR /app
#see https://www.jrebel.com/blog/how-to-speed-up-your-maven-build
......
......@@ -28,7 +28,7 @@
<profile>
<id>sonar</id>
<properties>
<sonar.host.url>${env.SONAR_HOST}</sonar.host.url>
<sonar.host.url>${env.SONAR_URL}</sonar.host.url>
<sonar.login>${env.SONAR_TOKEN}</sonar.login>
</properties>
</profile>
......
......@@ -173,6 +173,7 @@
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-annotations</artifactId>
<version>2.2.1.Final</version>
<exclusions>
<exclusion>
<groupId>org.jboss.logging</groupId>
......@@ -298,4 +299,25 @@
</repository>
</repositories>
<profiles>
<profile>
<id>sonar</id>
<build>
<plugins>
<!--Sonarquve -->
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.9.1.2184</version>
</plugin>
<plugin>
<groupId>io.github.r0bb3n</groupId>
<artifactId>sonar-quality-gate-maven-plugin</artifactId>
<version>1.1.0</version>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment