From fd357ecb2e031aa6d9decf2ff0b4599217226d33 Mon Sep 17 00:00:00 2001 From: mmalohlava Date: Thu, 22 Jun 2017 16:17:13 -0700 Subject: [PATCH] [BUILD] Trigger publication into nexus only on internal network + replace nexus machine IP by hostname --- gradle.properties | 2 +- gradle/publish.gradle | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index a8a7955870e..f5ea3fc32b3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -37,4 +37,4 @@ doUploadUBenchResults=false # # Internal Nexus location # -localNexusLocation=http://172.17.0.53:8081/nexus/repository +localNexusLocation=http://nexus:8081/nexus/repository diff --git a/gradle/publish.gradle b/gradle/publish.gradle index 1df3a85e084..9c38386efe2 100644 --- a/gradle/publish.gradle +++ b/gradle/publish.gradle @@ -146,10 +146,17 @@ publishing { password project["oss-releases.password"] } } - } else { + } + + def isInternalBuild = Boolean.valueOf(project.findProperty("isInternalBuild") ?: "false") + if (isInternalBuild) { // We will setup local repo only for internal builds maven { name "LocalNexusRepo" - url "${localNexusLocation}/snapshots" + if (project.ext.isRelease) { + url "${localNexusLocation}/releases" + } else { + url "${localNexusLocation}/snapshots" + } credentials { username project.findProperty("local-release-maven.username") ?: ""