aboutsummaryrefslogtreecommitdiffstats
path: root/build.gradle
diff options
context:
space:
mode:
authorEric Hartmann <hartmann.eric@gmail.com>2018-03-15 09:38:35 +0100
committerEric Hartmann <hartmann.eric@gmail.com>2018-03-15 09:38:35 +0100
commitd59e156545eac12b1ff7591c69f2f7d1fcf98328 (patch)
tree2b199447f723fb8327acca24ef7e74bf49726de0 /build.gradle
parent7324f17d4b8928e1ec855a7b66bfe302514a90fc (diff)
downloadsonarqube-d59e156545eac12b1ff7591c69f2f7d1fcf98328.tar.gz
sonarqube-d59e156545eac12b1ff7591c69f2f7d1fcf98328.zip
Fix Gradle build without credentials
Diffstat (limited to 'build.gradle')
-rw-r--r--build.gradle8
1 files changed, 4 insertions, 4 deletions
diff --git a/build.gradle b/build.gradle
index 2dfc439d7fc..4afdc28f758 100644
--- a/build.gradle
+++ b/build.gradle
@@ -42,8 +42,8 @@ allprojects {
def repository = project.hasProperty('cix') ? 'sonarsource-qa' : 'sonarsource'
maven {
url "https://repox.sonarsource.com/${repository}"
- def artifactoryUsername = System.env.'ARTIFACTORY_PRIVATE_USERNAME' ?: ARTIFACTORY_PRIVATE_USERNAME
- def artifactoryPassword = System.env.'ARTIFACTORY_PRIVATE_PASSWORD' ?: ARTIFACTORY_PRIVATE_PASSWORD
+ def artifactoryUsername = System.env.'ARTIFACTORY_PRIVATE_USERNAME' ?: (project.hasProperty('artifactoryUsername') ? project.getProperty('artifactoryUsername') : '')
+ def artifactoryPassword = System.env.'ARTIFACTORY_PRIVATE_PASSWORD' ?: (project.hasProperty('artifactoryPassword') ? project.getProperty('artifactoryPassword') : '')
if (artifactoryUsername && artifactoryPassword) {
credentials {
username artifactoryUsername
@@ -279,8 +279,8 @@ artifactory {
publish {
repository {
repoKey = System.getenv('ARTIFACTORY_DEPLOY_REPO')
- username = System.getenv('ARTIFACTORY_DEPLOY_USERNAME')
- password = System.getenv('ARTIFACTORY_DEPLOY_PASSWORD')
+ username = System.getenv('ARTIFACTORY_DEPLOY_USERNAME') ?: project.properties.artifactoryUsername
+ password = System.getenv('ARTIFACTORY_DEPLOY_PASSWORD') ?: project.properties.artifactoryPaswword
}
defaults {
properties = [