Signed-off-by: Taylor Smock <tsmock@fb.com>
pull/1/head
Taylor Smock 2020-09-15 08:16:55 -06:00
rodzic aa99c12233
commit 8c516efeaf
2 zmienionych plików z 28 dodań i 0 usunięć

Wyświetl plik

@ -121,6 +121,21 @@ build:
- build
needs: ["assemble"]
sonarcloud.io:
image: registry.gitlab.com/josm/docker-library/openjdk-8-josmplugin:latest
stage: test
environment:
name: sonarcloud.io
url: https://sonarcloud.io/dashboard?id=mapwithai%3Amapwithai
script:
- ./gradlew -Dsonar.login=$SONAR_TOKEN sonarqube
needs: ["assemble"]
rules:
- if: '$CI_MERGE_REQUEST_IID && $SONAR_TOKEN =~ /[0-9a-z]+/'
- if: '$CI_COMMIT_TAG && $SONAR_TOKEN =~ /[0-9a-z]+/'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $SONAR_TOKEN =~ /[0-9a-z]+/'
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $SONAR_TOKEN =~ /[0-9a-z]+/'
test:
stage: test
script:

Wyświetl plik

@ -15,6 +15,7 @@ plugins {
id "org.openstreetmap.josm" version "0.7.0"
id "net.ltgt.errorprone" version "1.2.1"
id "com.diffplug.spotless" version "5.1.0"
id "org.sonarqube" version "3.0"
//id 'de.aaschmid.cpd' version '2.0'
}
@ -277,3 +278,15 @@ if (ciJobToken != null && projectId!= null) {
}
}
}
sonarqube {
properties {
property "sonar.organization", "mapwithai"
property "sonar.projectKey", "mapwithai"
property("sonar.forceAuthentication", "true")
property("sonar.host.url", "https://sonarcloud.io")
property("sonar.projectDescription", properties.get("plugin.description"))
property("sonar.projectVersion", project.version)
property("sonar.sources", listOf("src"))
}
}