Commit f8c9ab2e authored by Erik Kimmel's avatar Erik Kimmel Committed by Raphaël Flores
Browse files

Chore: update deprecated sonarqube properties and add properties needed for MR decoration.

parent 9e412e96
...@@ -129,17 +129,21 @@ test-and-sonarqube: ...@@ -129,17 +129,21 @@ test-and-sonarqube:
exec chroot --userspec=1000 / elasticsearch -Ediscovery.type=single-node -Ecluster.name=elasticsearch" exec chroot --userspec=1000 / elasticsearch -Ediscovery.type=single-node -Ecluster.name=elasticsearch"
variables: variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=true" GRADLE_OPTS: "-Dorg.gradle.daemon=true"
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
SONAR_BRANCH_OPTS: "-Dsonar.pullrequest.key=$CI_MERGE_REQUEST_ID -Dsonar.pullrequest.branch=$CI_COMMIT_REF_NAME" SONAR_BRANCH_OPTS: "-Dsonar.pullrequest.key=$CI_MERGE_REQUEST_ID -Dsonar.pullrequest.branch=$CI_COMMIT_REF_NAME"
script: script:
- ./gradlew --parallel test - ./gradlew --parallel test jacocoTestReport
- find /tmp/node/*/bin -name node -exec ln -s {} /tmp/node/node \; - find /tmp/node/*/bin -name node -exec ln -s {} /tmp/node/node \;
- export PATH="/tmp/node/:$PATH" - export PATH="/tmp/node/:$PATH"
- ./gradlew sonarqube -x test $SONAR_BRANCH_OPTS - ./gradlew sonarqube -x test $SONAR_BRANCH_OPTS
cache: cache:
key: "$CI_COMMIT_REF_NAME" #key: "$CI_COMMIT_REF_NAME"
key: "${CI_JOB_NAME}"
policy: pull-push policy: pull-push
paths: paths:
- .gradle - .gradle
- .sonar/cache
- frontend/.gradle/ - frontend/.gradle/
- frontend/node_modules/ - frontend/node_modules/
artifacts: artifacts:
......
plugins { plugins {
id("org.sonarqube") version "2.8" id("org.sonarqube") version "3.2.0"
}
sonarqube {
properties {
property ("sonar.projectKey", "urgi-is_data-discovery_AXlG7GtvPgTGgvpuDgeV")
property ("sonar.qualitygate.wait", false)
}
} }
...@@ -6,7 +6,6 @@ systemProp.sonar.sources=frontend/src ...@@ -6,7 +6,6 @@ systemProp.sonar.sources=frontend/src
systemProp.sonar.language=typescript systemProp.sonar.language=typescript
systemProp.sonar.scm.provider=git systemProp.sonar.scm.provider=git
systemProp.sonar.typescript.tsconfigPath=frontend/tsconfig.json systemProp.sonar.typescript.tsconfigPath=frontend/tsconfig.json
systemProp.sonar.typescript.lcov.reportPaths=frontend/coverage/lcov.info systemProp.sonar.javascript.lcov.reportPaths=frontend/coverage/lcov.info
#systemProp.sonar.typescript.node=/tmp/node/node-v12.14.1-linux-x64/bin/node systemProp.sonar.nodejs.executable=/tmp/node/node
systemProp.sonar.typescript.node=/tmp/node/node
systemProp.sonar.typescript.exclusions=**/*.spec.ts systemProp.sonar.typescript.exclusions=**/*.spec.ts
Supports Markdown
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