Mercurial > public > develkit
comparison init.gradle @ 156:465c6cf6dff3
adjust bamboo server detection
author | Dave Smith <smith@nwoca.org> |
---|---|
date | Tue, 29 Oct 2013 01:25:34 +0100 |
parents | 6389a03379a6 |
children | bf82d6ce853d |
comparison
equal
deleted
inserted
replaced
155:6389a03379a6 | 156:465c6cf6dff3 |
---|---|
9 gradle.addListener(new ArtifactoryGradleSettings()) | 9 gradle.addListener(new ArtifactoryGradleSettings()) |
10 | 10 |
11 def hostname | 11 def hostname |
12 try { hostname = "hostname".execute().text.toLowerCase().readLines().first() } catch (e) { hostname = 'unknown'} | 12 try { hostname = "hostname".execute().text.toLowerCase().readLines().first() } catch (e) { hostname = 'unknown'} |
13 | 13 |
14 gradle.ext.bambooBuild = System.getenv().any { it.key.startsWith('BAMBOO')} || hostname?.startsWith('ssdt-') | 14 gradle.ext.bambooBuild = System.getenv().any { it.key.toLowerCase().contains('bamboo')} || hostname?.startsWith('ssdt-') |
15 | 15 |
16 gradle.ext.bambooPlan = (System.getenv('BAMBOO_PLAN') ?: 'UNKNOWN-UNKNOWN-JOB1').split('-')[0..1].join('-') | 16 gradle.ext.bambooPlan = (System.getenv('BAMBOO_PLAN') ?: 'UNKNOWN-UNKNOWN-JOB1').split('-')[0..1].join('-') |
17 logger.info "Bamboo plan: ${gradle.bambooPlan}" | 17 logger.info "Bamboo plan: ${gradle.bambooPlan}" |
18 | 18 |
19 gradle.ext.buildTimestamp = System.currentTimeMillis().toString().padLeft(14,'0') | 19 gradle.ext.buildTimestamp = System.currentTimeMillis().toString().padLeft(14,'0') |