The path to a custom configuration file can be provided with command-line property `-Dorchestrator.configUrl=file:///path/to/orchestrator.properties` or with
environment variable `ORCHESTRATOR_CONFIG_URL=file:///path/to/orchestrator.properties`.
+### Find available updates of dependencies
+
+Execute from project base directory:
+
+ ./gradlew dependencyUpdates
+
### Update the files missing the license header
Execute from project base directory:
ext {
release = project.hasProperty('release') && project.getProperty('release')
official = project.hasProperty('official') && project.getProperty('official')
+ pomConfig = {
+ name projectTitle
+ description description
+ url 'http://www.sonarqube.org/'
+ organization {
+ name 'SonarSource'
+ url 'http://www.sonarsource.com'
+ }
+ licenses {
+ license {
+ name 'GNU LGPL 3'
+ url 'http://www.gnu.org/licenses/lgpl.txt'
+ distribution 'repo'
+ }
+ }
+ scm {
+ url 'https://github.com/SonarSource/sonarqube'
+ }
+ developers {
+ developer {
+ id 'bellingard'
+ name 'Fabrice Bellingard'
+ }
+ developer {
+ id 'dbolkensteyn'
+ name 'Dinesh Bolkensteyn'
+ }
+ developer {
+ id 'ehartmann'
+ name 'Eric Hartmann'
+ }
+ developer {
+ id 'fmallet'
+ name 'Freddy Mallet'
+ }
+ developer {
+ id 'Godin'
+ name 'Evgeny Mandrikov'
+ }
+ developer {
+ id 'henryju'
+ name 'Julien Henry'
+ }
+ developer {
+ id 'jblievremont'
+ name 'Jean-Baptiste Lievremont'
+ }
+ developer {
+ id 'julienlancelot'
+ name 'Julien Lancelot'
+ }
+ developer {
+ id 'olivier.gaudin'
+ name 'Olivier Gaudin'
+ }
+ developer {
+ id 'simonbrandhof'
+ name 'Simon Brandhof'
+ }
+ developer {
+ id 'sns-seb'
+ name 'Sebastien Lesaint'
+ }
+ developer {
+ id 'stas-vilchik'
+ name 'Stas Vilchik'
+ }
+ developer {
+ id 'teryk'
+ name 'Teryk Bellahsene'
+ }
+ }
+ }
}
repositories {
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
artifact sourcesJar
artifact javadocJar
artifact testJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
artifact sourcesJar
artifact javadocJar
artifact testJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
artifact sourcesJar
artifact javadocJar
artifact testJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
task licenseCheckWeb(type: com.hierynomus.gradle.license.tasks.LicenseCheck) {
source = sources
- if (release) exclude 'main/js/app/components/GlobalFooterBranding.js'
+ if (official) exclude 'main/js/app/components/GlobalFooterBranding.js'
}
licenseMain.dependsOn licenseCheckWeb
task licenseFormatWeb(type: com.hierynomus.gradle.license.tasks.LicenseFormat) {
source = sources
- if (release) exclude 'main/js/app/components/GlobalFooterBranding.js'
+ if (official) exclude 'main/js/app/components/GlobalFooterBranding.js'
}
licenseFormat.dependsOn licenseFormatWeb
publishing {
publications {
mavenJava(MavenPublication) {
- pom.withXml {
- asNode().appendNode('description', description)
- asNode().children().last() + pomConfig
+ if (release) {
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
artifact zip
}
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
publishing {
publications {
mavenJava(MavenPublication) {
- pom.withXml {
- asNode().appendNode('description', description)
- asNode().children().last() + pomConfig
- }
artifact source: shadowJar, classifier: null
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
if (release) {
artifact sourcesJar
artifact javadocJar
+ pom.withXml {
+ asNode().appendNode('description', description)
+ asNode().children().last() + pomConfig
+ }
}
}
}
BUILD)
installJdk8
- installNode
-
- # Used by Next
- export INITIAL_VERSION=$(cat gradle.properties | grep version | awk -F= '{print $2}')
-
- # Fetch all commit history so that SonarQube has exact blame information
- # for issue auto-assignment
- # This command can fail with "fatal: --unshallow on a complete repository does not make sense"
- # if there are not enough commits in the Git repository (even if Travis executed git clone --depth 50).
- # For this reason errors are ignored with "|| true"
- git fetch --unshallow || true
-
- if [ "$TRAVIS_REPO_SLUG" == "SonarSource/sonarqube" ]; then
- # public repository
- ./gradlew build --no-daemon --console plain
-
- elif [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
- echo 'Build and analyze master'
- ./gradlew --no-daemon --console plain \
- -DbuildNumber=$BUILD_NUMBER \
- build sonarqube artifactoryPublish -PjacocoEnabled=true -Pofficial=true -Prelease=true \
- -Dsonar.host.url=$SONAR_HOST_URL \
- -Dsonar.login=$SONAR_TOKEN \
- -Dsonar.projectVersion=$INITIAL_VERSION \
- -Dsonar.analysis.buildNumber=$BUILD_NUMBER \
- -Dsonar.analysis.pipeline=$BUILD_NUMBER \
- -Dsonar.analysis.sha1=$GIT_COMMIT \
- -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG
-
- elif [[ "$TRAVIS_BRANCH" == "branch-"* ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
- echo 'Build release branch'
- ./gradlew --no-daemon --console plain \
- -DbuildNumber=$BUILD_NUMBER \
- build sonarqube artifactoryPublish -PjacocoEnabled=true -Pofficial=true -Prelease=true \
- -Dsonar.host.url=$SONAR_HOST_URL \
- -Dsonar.login=$SONAR_TOKEN \
- -Dsonar.branch.name=$TRAVIS_BRANCH \
- -Dsonar.projectVersion=$INITIAL_VERSION \
- -Dsonar.analysis.buildNumber=$BUILD_NUMBER \
- -Dsonar.analysis.pipeline=$BUILD_NUMBER \
- -Dsonar.analysis.sha1=$GIT_COMMIT \
- -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG
-
- elif [ "$TRAVIS_PULL_REQUEST" != "false" ] && [ -n "${GITHUB_TOKEN:-}" ]; then
- echo 'Build and analyze internal pull request'
- ./gradlew --no-daemon --console plain \
- -DbuildNumber=$BUILD_NUMBER \
- build sonarqube artifactoryPublish -PjacocoEnabled=true -Pofficial=true \
- -Dsonar.host.url=$SONAR_HOST_URL \
- -Dsonar.login=$SONAR_TOKEN \
- -Dsonar.analysis.buildNumber=$BUILD_NUMBER \
- -Dsonar.analysis.pipeline=$BUILD_NUMBER \
- -Dsonar.analysis.sha1=$TRAVIS_PULL_REQUEST_SHA \
- -Dsonar.analysis.prNumber=$TRAVIS_PULL_REQUEST \
- -Dsonar.analysis.repository=$TRAVIS_REPO_SLUG \
- -Dsonar.pullrequest.key=$TRAVIS_PULL_REQUEST \
- -Dsonar.pullrequest.branch=$TRAVIS_PULL_REQUEST_BRANCH \
- -Dsonar.pullrequest.base=$TRAVIS_BRANCH \
- -Dsonar.pullrequest.provider=github \
- -Dsonar.pullrequest.github.repository=$TRAVIS_REPO_SLUG
-
- else
- echo 'Build feature branch or external pull request'
- ./gradlew --no-daemon --console plain \
- -DbuildNumber=$BUILD_NUMBER -Pofficial=true \
- build artifactoryPublish
- fi
+ ./gradlew build --no-daemon --console plain
;;
WEB_TESTS)