You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.gradle 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /**
  2. * This module is building the zip file containing the static web site
  3. */
  4. sonarqube {
  5. skipProject = true
  6. }
  7. group = 'com.sonarsource'
  8. apply plugin: 'com.moowork.node'
  9. node {
  10. version = '8.10.0'
  11. yarnVersion = '1.5.1'
  12. download = true
  13. }
  14. yarn_run {
  15. inputs.dir('src').withPathSensitivity(PathSensitivity.RELATIVE)
  16. inputs.files('gatsby-config.js', 'gatsby-node.js', 'package.json', 'yarn.lock')
  17. outputs.dir('public')
  18. outputs.cacheIf { true }
  19. args = ['build']
  20. }
  21. task zip(type: Zip) {
  22. def archiveDir = "sonarqube-docs-$version"
  23. duplicatesStrategy DuplicatesStrategy.EXCLUDE
  24. baseName "sonar-docs"
  25. into("${archiveDir}") {
  26. from tasks.getByName('yarn_run').outputs
  27. }
  28. }
  29. zip.dependsOn yarn_run
  30. assemble.dependsOn zip
  31. publishing {
  32. publications {
  33. docs(MavenPublication) {
  34. artifactId 'sonar-docs'
  35. artifact zip
  36. }
  37. }
  38. }
  39. artifactory {
  40. publish {
  41. contextUrl = System.getenv('ARTIFACTORY_URL')
  42. repository {
  43. repoKey = System.getenv('ARTIFACTORY_DEPLOY_REPO_PRIVATE')
  44. username = System.getenv('ARTIFACTORY_DEPLOY_USERNAME_PRIVATE')
  45. password = System.getenv('ARTIFACTORY_DEPLOY_PASSWORD_PRIVATE')
  46. }
  47. }
  48. }
  49. artifactoryPublish {
  50. skip = false
  51. publishPom = false
  52. publications(publishing.publications.docs)
  53. }