diff options
author | Eric Hartmann <hartmann.eric@gmail.com> | 2018-06-21 09:28:15 +0200 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2018-06-29 09:10:18 +0200 |
commit | 769673ede15e8ec4c5737475a9eb901b4524c1df (patch) | |
tree | 56ee3e62af2c268daf427036766866e0762763c8 /server/sonar-docs/build.gradle | |
parent | 0087f816fd3afe326de99cd37cd34da8b0ee49de (diff) | |
download | sonarqube-769673ede15e8ec4c5737475a9eb901b4524c1df.tar.gz sonarqube-769673ede15e8ec4c5737475a9eb901b4524c1df.zip |
SONAR-10860 Add a zip for documentation
Diffstat (limited to 'server/sonar-docs/build.gradle')
-rw-r--r-- | server/sonar-docs/build.gradle | 62 |
1 files changed, 62 insertions, 0 deletions
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) +} |