Commit 112d0734 authored by Jujube Orange's avatar Jujube Orange
Browse files

Merge branch 'feature/enable-sonar' into 'develop'

feat(ci): enable sonar analysis

See merge request !39
parents 0e6e657d ee86918b
Pipeline #324257 canceled with stages
in 39 minutes and 46 seconds
variables:
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
VERSIONING_DISABLE: "false"
VERSIONING_GIT_TAG: $CI_COMMIT_TAG
VERSIONING_GIT_BRANCH: $CI_COMMIT_BRANCH
ANSIBLE_DEPLOY_PROJECT: clea/clea-ansible
default:
cache:
paths:
- .m2/repository/
tags:
- qlf-ci.inria.fr
include:
- project: stopcovid19/accueil
file: gitlab/gitlab-ci-java-template.yml
stages:
- build
- docker e2e tests
- deploy
- int e2e tests
build:
image: maven:3.6.3-adoptopenjdk-11
stage: build
script:
- mvn -B -s .mvn/settings-ci.xml -ntp -fae -DdeployAtEnd spotless:check deploy
artifacts:
paths:
- "**/target/*.jar"
reports:
junit:
- "**/target/surefire-reports/TEST-*.xml"
tests-docker:
image: registry.gitlab.inria.fr/stemcovid19/tac-server/docker-image/tac-system-tests:latest
stage: docker e2e tests
before_script:
- export PATH="$PWD/docker-compose:$PATH"
- export CLEA_ROOT_DIR=$CI_PROJECT_DIR
e2e-tests-docker:
script:
- currentContainer=$(basename $(cat /proc/1/cpuset))
- docker-compose up -d
- docker network connect clea-server_default $currentContainer
- java -jar -Dspring.profiles.active=docker clea-integration-tests/target/clea-integration-tests-*.jar
- docker network disconnect clea-server_default $currentContainer
- docker-compose down
artifacts:
paths:
- "$CI_PROJECT_DIR/target/cucumber-reports.html"
expire_in: 2 weeks
deploy-int:
stage: deploy
variables:
APP_VERSION: develop-SNAPSHOT
trigger:
project: stemcovid19/infrastructure/functional-zone/services/clea/clea-ansible
branch: master
strategy: depend
rules:
- if: '$CI_COMMIT_BRANCH == "develop"'
......@@ -177,6 +177,40 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.7</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.7</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>6.3.1</version>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.9.0.2155</version>
</plugin>
</plugins>
<pluginManagement>
<plugins>
......@@ -275,11 +309,16 @@
</profiles>
<repositories>
<repository>
<id>gitlab-maven</id>
<url
>https://gitlab.inria.fr/api/v4/projects/29881/packages/maven</url>
</repository>
<repository>
<id>gitlab-maven-clea-crypto</id>
<url>
https://gitlab.inria.fr/api/v4/projects/28288/packages/maven
</url>
</url>
</repository>
</repositories>
<distributionManagement>
......@@ -287,13 +326,13 @@
<id>gitlab-maven</id>
<url>
https://gitlab.inria.fr/api/v4/projects/29881/packages/maven
</url>
</url>
</repository>
<snapshotRepository>
<id>gitlab-maven</id>
<url>
https://gitlab.inria.fr/api/v4/projects/29881/packages/maven
</url>
</url>
</snapshotRepository>
</distributionManagement>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment