2018-06-21 09:28:15 +02:00
|
|
|
/**
|
|
|
|
* This module is building the zip file containing the static web site
|
|
|
|
*/
|
|
|
|
|
|
|
|
sonarqube {
|
|
|
|
skipProject = true
|
|
|
|
}
|
|
|
|
|
2018-07-06 11:06:57 +02:00
|
|
|
group = 'com.sonarsource.sonarqube'
|
2018-06-28 16:12:32 +02:00
|
|
|
|
2019-03-27 19:45:34 +01:00
|
|
|
clean.doFirst {
|
2019-04-02 21:13:11 +02:00
|
|
|
delete "${project.buildDir}/public/"
|
2019-03-27 19:45:34 +01:00
|
|
|
}
|
|
|
|
|
2018-06-21 09:28:15 +02:00
|
|
|
yarn_run {
|
2018-10-15 18:07:26 +02:00
|
|
|
environment = [ GATSBY_DOCS_VERSION: version ]
|
|
|
|
inputs.property('version', version)
|
2018-06-21 09:28:15 +02:00
|
|
|
inputs.dir('src').withPathSensitivity(PathSensitivity.RELATIVE)
|
2019-03-27 16:06:20 +01:00
|
|
|
['gatsby-config.js', 'gatsby-node.js', 'package.json', 'yarn.lock', 'tsconfig.json'].each {
|
2018-08-21 17:16:06 +02:00
|
|
|
inputs.file(it).withPathSensitivity(PathSensitivity.RELATIVE)
|
|
|
|
}
|
2018-06-21 09:28:15 +02:00
|
|
|
outputs.dir('public')
|
|
|
|
outputs.cacheIf { true }
|
|
|
|
args = ['build']
|
|
|
|
}
|
|
|
|
|
2018-08-29 10:25:32 +02:00
|
|
|
task "yarn_lint-report"() {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2018-06-21 09:28:15 +02:00
|
|
|
task zip(type: Zip) {
|
2018-10-15 18:07:26 +02:00
|
|
|
def archiveDir = "$version"
|
2018-06-21 09:28:15 +02:00
|
|
|
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)
|
|
|
|
}
|