Mercurial > public > develkit
diff init.gradle @ 115:8ddd1a6fa4ea
patch to improve identification of bamboo severs
author | smith@nwoca.org |
---|---|
date | Wed, 31 Oct 2012 22:27:31 +0100 |
parents | 9ed6a36104ed |
children | 6f1918544f7f |
line wrap: on
line diff
--- a/init.gradle Fri Oct 26 21:32:27 2012 +0100 +++ b/init.gradle Wed Oct 31 22:27:31 2012 +0100 @@ -9,8 +9,12 @@ gradle.addListener(new ArtifactoryGradleSettings()) -gradle.ext.bambooBuild = System.getenv().any { it.key.startsWith('BAMBOO')} -logger.info "applying SSDT artifactory Gradle Settings (bamboo: $gradle.bambooBuild)" +def hostname +try { hostname = "hostname".execute().text.toLowerCase().readLines().first() } catch (e) { hostname = 'unknown'} + +gradle.ext.bambooBuild = System.getenv().any { it.key.startsWith('BAMBOO')} || hostname?.startsWith('ssdt-') + +logger.info "applying SSDT artifactory Gradle Settings (bamboo: $gradle.bambooBuild host: $hostname)" if (gradle.bambooBuild) { gradle.ext.ssdtGradlekitLocation = gradle.ext.has('ssdtGradlekitLocation') ? gradle.ssdtGradlekitLocation : 'http://hg.ssdt-ohio.org/ssdt/gradlekit/raw-file/tip' @@ -119,13 +123,15 @@ task showEnvironments << { - println "Defined environments: $gradle.environments" + println "Defined environments: $gradle.environments" gradle.environments.each { e -> println "\n $e:" gradle.getProperty(e).flatten().each { k, v -> println String.format(' %25s = %s',k, k.contains('password') ? "********" : v ) } } +// println "System Properties: " +// System.properties.each { println " $it" } } def loadEnvironments() {