aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.gradle3
-rw-r--r--server/sonar-docs/build.gradle62
-rw-r--r--settings.gradle1
3 files changed, 65 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle
index d94f2d73c36..2a55eceb0cb 100644
--- a/build.gradle
+++ b/build.gradle
@@ -420,7 +420,8 @@ artifactory {
'com.sonarsource.sonarqube:sonarcloud:zip,' +
'com.sonarsource.sonarqube:sonarqube-developer:yguard,' +
'com.sonarsource.sonarqube:sonarqube-datacenter:yguard,' +
- 'com.sonarsource.sonarqube:sonarqube-enterprise:yguard')
+ 'com.sonarsource.sonarqube:sonarqube-enterprise:yguard,' +
+ 'com.sonarsource.sonarqube:docs:zip')
// The name of this variable is important because it's used by the delivery process when extracting version from Artifactory build info.
clientConfig.info.addEnvironmentProperty('PROJECT_VERSION', "${version}")
}
diff --git a/server/sonar-docs/build.gradle b/server/sonar-docs/build.gradle
new file mode 100644
index 00000000000..0af1f4e3094
--- /dev/null
+++ b/server/sonar-docs/build.gradle
@@ -0,0 +1,62 @@
+/**
+ * This module is building the zip file containing the static web site
+ */
+
+sonarqube {
+ skipProject = true
+}
+
+apply plugin: 'com.moowork.node'
+
+node {
+ version = '8.10.0'
+ yarnVersion = '1.5.1'
+ download = true
+}
+
+yarn_run {
+ inputs.dir('src').withPathSensitivity(PathSensitivity.RELATIVE)
+ inputs.files('gatsby-config.js', 'gatsby-node.js', 'package.json', 'yarn.lock')
+ outputs.dir('public')
+ outputs.cacheIf { true }
+
+ args = ['build']
+}
+
+task zip(type: Zip) {
+ def archiveDir = "sonarqube-docs-$version"
+ duplicatesStrategy DuplicatesStrategy.EXCLUDE
+ baseName "sonar-docs"
+
+ into("${archiveDir}") {
+ from tasks.getByName('yarn_run').outputs
+ }
+}
+zip.dependsOn yarn_run
+assemble.dependsOn zip
+
+publishing {
+ publications {
+ docs(MavenPublication) {
+ artifactId 'sonar-docs'
+ artifact zip
+ }
+ }
+}
+
+artifactory {
+ publish {
+ contextUrl = System.getenv('ARTIFACTORY_URL')
+ repository {
+ repoKey = System.getenv('ARTIFACTORY_DEPLOY_REPO_PRIVATE')
+ username = System.getenv('ARTIFACTORY_DEPLOY_USERNAME_PRIVATE')
+ password = System.getenv('ARTIFACTORY_DEPLOY_PASSWORD_PRIVATE')
+ }
+ }
+}
+
+artifactoryPublish {
+ skip = false
+ publishPom = false
+ publications(publishing.publications.docs)
+}
diff --git a/settings.gradle b/settings.gradle
index 6b469663924..54155954d8f 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -11,6 +11,7 @@ include 'server:sonar-db-testing'
include 'server:sonar-db-core'
include 'server:sonar-db-dao'
include 'server:sonar-db-migration'
+include 'server:sonar-docs'
include 'server:sonar-main'
include 'server:sonar-plugin-bridge'
include 'server:sonar-process'