|
|
@@ -70,6 +70,43 @@ allprojects { |
|
|
|
task allDependencies { |
|
|
|
dependsOn 'dependencies' |
|
|
|
} |
|
|
|
|
|
|
|
artifactory { |
|
|
|
clientConfig.setIncludeEnvVars(true) |
|
|
|
clientConfig.setEnvVarsExcludePatterns('*password*,*PASSWORD*,*secret*,*MAVEN_CMD_LINE_ARGS*,sun.java.command,*token*,*TOKEN*,*LOGIN*,*login*,*key*,*KEY*') |
|
|
|
contextUrl = System.getenv('ARTIFACTORY_URL') |
|
|
|
publish { |
|
|
|
repository { |
|
|
|
repoKey = System.getenv('ARTIFACTORY_DEPLOY_REPO') |
|
|
|
username = System.getenv('ARTIFACTORY_DEPLOY_USERNAME') ?: project.properties.artifactoryUsername |
|
|
|
password = System.getenv('ARTIFACTORY_DEPLOY_PASSWORD') ?: project.properties.artifactoryPaswword |
|
|
|
} |
|
|
|
defaults { |
|
|
|
properties = [ |
|
|
|
'build.name': 'sonar-enterprise', |
|
|
|
'build.number': System.getenv('BUILD_NUMBER'), |
|
|
|
'pr.branch.target': System.getenv('GITHUB_BASE_BRANCH'), |
|
|
|
'pr.number': System.getenv('PULL_REQUEST'), |
|
|
|
'vcs.branch': System.getenv('GITHUB_BRANCH'), |
|
|
|
'vcs.revision': System.getenv('GIT_SHA1'), |
|
|
|
'version': version |
|
|
|
] |
|
|
|
publications('mavenJava') |
|
|
|
publishPom = true |
|
|
|
publishIvy = false |
|
|
|
} |
|
|
|
} |
|
|
|
clientConfig.info.setBuildName('sonar-enterprise') |
|
|
|
clientConfig.info.setBuildNumber(System.getenv('BUILD_NUMBER')) |
|
|
|
// Define the artifacts to be deployed to https://binaries.sonarsource.com on releases |
|
|
|
clientConfig.info.addEnvironmentProperty('ARTIFACTS_TO_PUBLISH', |
|
|
|
"${project.group}:sonar-application:zip," + |
|
|
|
"com.sonarsource.sonarqube:sonarqube-developer:zip," + |
|
|
|
"com.sonarsource.sonarqube:sonarqube-datacenter:zip," + |
|
|
|
"com.sonarsource.sonarqube:sonarqube-enterprise: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}") |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
apply plugin: 'org.sonarqube' |
|
|
@@ -491,44 +528,6 @@ yarnInstallTasks.drop(1).eachWithIndex { it, i -> it.mustRunAfter(yarnInstallTas |
|
|
|
// and to prevent developers from forgetting to update lock file when they update "package.json" |
|
|
|
yarnInstallTasks.each { it -> it.args = ['--frozen-lockfile'] } |
|
|
|
|
|
|
|
|
|
|
|
artifactory { |
|
|
|
clientConfig.setIncludeEnvVars(true) |
|
|
|
clientConfig.setEnvVarsExcludePatterns('*password*,*PASSWORD*,*secret*,*MAVEN_CMD_LINE_ARGS*,sun.java.command,*token*,*TOKEN*,*LOGIN*,*login*,*key*,*KEY*') |
|
|
|
contextUrl = System.getenv('ARTIFACTORY_URL') |
|
|
|
publish { |
|
|
|
repository { |
|
|
|
repoKey = System.getenv('ARTIFACTORY_DEPLOY_REPO') |
|
|
|
username = System.getenv('ARTIFACTORY_DEPLOY_USERNAME') ?: project.properties.artifactoryUsername |
|
|
|
password = System.getenv('ARTIFACTORY_DEPLOY_PASSWORD') ?: project.properties.artifactoryPaswword |
|
|
|
} |
|
|
|
defaults { |
|
|
|
properties = [ |
|
|
|
'build.name': 'sonar-enterprise', |
|
|
|
'build.number': System.getenv('BUILD_NUMBER'), |
|
|
|
'pr.branch.target': System.getenv('GITHUB_BASE_BRANCH'), |
|
|
|
'pr.number': System.getenv('PULL_REQUEST'), |
|
|
|
'vcs.branch': System.getenv('GITHUB_BRANCH'), |
|
|
|
'vcs.revision': System.getenv('GIT_SHA1'), |
|
|
|
'version': version |
|
|
|
] |
|
|
|
publications('mavenJava') |
|
|
|
publishPom = true |
|
|
|
publishIvy = false |
|
|
|
} |
|
|
|
} |
|
|
|
clientConfig.info.setBuildName('sonar-enterprise') |
|
|
|
clientConfig.info.setBuildNumber(System.getenv('BUILD_NUMBER')) |
|
|
|
// Define the artifacts to be deployed to https://binaries.sonarsource.com on releases |
|
|
|
clientConfig.info.addEnvironmentProperty('ARTIFACTS_TO_PUBLISH', |
|
|
|
"${project.group}:sonar-application:zip," + |
|
|
|
"com.sonarsource.sonarqube:sonarqube-developer:zip," + |
|
|
|
"com.sonarsource.sonarqube:sonarqube-datacenter:zip," + |
|
|
|
"com.sonarsource.sonarqube:sonarqube-enterprise: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}") |
|
|
|
} |
|
|
|
|
|
|
|
// https://github.com/ben-manes/gradle-versions-plugin |
|
|
|
apply plugin: 'com.github.ben-manes.versions' |
|
|
|
dependencyUpdates { |