# HG changeset patch # User smith@nwoca.org # Date 1370395788 -3600 # Node ID bef2bfc61f6ec4086f0c9527d91b7259926373ae # Parent c93df17513f157d1abde302643ee2b57f714abe9 CM-133: fix bamboo plan parsing. enable showEnv to display sytem properties and env variables in -info mode diff -r c93df17513f1 -r bef2bfc61f6e init.gradle --- a/init.gradle Tue Jun 04 23:13:59 2013 +0100 +++ b/init.gradle Wed Jun 05 02:29:48 2013 +0100 @@ -14,7 +14,8 @@ gradle.ext.bambooBuild = System.getenv().any { it.key.startsWith('BAMBOO')} || hostname?.startsWith('ssdt-') -gradle.ext.bambooPlan = System.getenv('BAMBOO_PLAN') ?: 'UNKNOWN' +gradle.ext.bambooPlan = (System.getenv('BAMBOO_PLAN') ?: 'UNKNOWN-UNKNOWN-JOB1').split('-')[0..1].join('-') +logger.info "Bamboo plan: ${gradle.bambooPlan}" gradle.ext.hgRepositoryUrl = "" try { @@ -192,8 +193,12 @@ println String.format(' %25s = %s',k, k.contains('password') ? "********" : v ) } } -// println "System Properties: " -// System.properties.each { println " $it" } + if (logger.isInfoEnabled() ) { + println "System properties:" + System.properties.each { println " $it" } + println "env variables:" + System.getenv().each { println " $it" } + } } def loadEnvironments() {