Mercurial > public > develkit
comparison init40.gradle @ 273:f5c641647fc6
add support for bamboo builds using a local repo
author | smith@nwoca.org |
---|---|
date | Tue, 05 Mar 2019 20:49:31 +0000 |
parents | 1d63556430a6 |
children | 068637778a0d |
comparison
equal
deleted
inserted
replaced
272:1d63556430a6 | 273:f5c641647fc6 |
---|---|
37 } | 37 } |
38 | 38 |
39 gradle.ext.bambooBuild = System.getenv().any { | 39 gradle.ext.bambooBuild = System.getenv().any { |
40 it.key.toLowerCase().contains('bamboo') | 40 it.key.toLowerCase().contains('bamboo') |
41 } || hostname?.startsWith('ssdt-ba') | 41 } || hostname?.startsWith('ssdt-ba') |
42 | |
43 if (!rootProject.hasProperty("bambooLocalBuild")) { | |
44 gradle.ext.bambooLocalBuild = false | |
45 } else { | |
46 gradle.ext.bambooLocalBuild = rootProject.bambooLocalBuild.toBoolean() | |
47 } | |
48 | |
49 if (gradle.bambooLocalBuild) { | |
50 println "Bamboo local build active" | |
51 } | |
42 | 52 |
43 gradle.ext.bambooPlan = (System.getenv('BAMBOO_PLAN') ?: 'UNKNOWN-UNKNOWN-JOB1').split('-')[0..1].join('-') | 53 gradle.ext.bambooPlan = (System.getenv('BAMBOO_PLAN') ?: 'UNKNOWN-UNKNOWN-JOB1').split('-')[0..1].join('-') |
44 logger.info "Bamboo plan: ${gradle.bambooPlan}" | 54 logger.info "Bamboo plan: ${gradle.bambooPlan}" |
45 | 55 |
46 gradle.ext.buildTimestamp = System.currentTimeMillis().toString().padLeft(14, '0') | 56 gradle.ext.buildTimestamp = System.currentTimeMillis().toString().padLeft(14, '0') |
252 subprojects { | 262 subprojects { |
253 | 263 |
254 it.ext.environment = gradle.environment | 264 it.ext.environment = gradle.environment |
255 | 265 |
256 dependencyLocking { | 266 dependencyLocking { |
257 if (gradle.branch.isRelease() ) { | 267 if (gradle.branch.isRelease()) { |
258 lockAllConfigurations() | 268 lockAllConfigurations() |
259 } | 269 } |
260 } | 270 } |
261 | 271 |
262 task("releaseLock" ) { | 272 task("releaseLock" ) { |
412 } | 422 } |
413 } | 423 } |
414 | 424 |
415 repositories { | 425 repositories { |
416 | 426 |
417 if (!gradle.bambooBuild) { | 427 if (!gradle.bambooBuild || gradle.bambooLocalBuild) { |
418 ivy { | 428 ivy { |
419 name = 'local' | 429 name = 'local' |
420 artifactPattern gradle.ivyUserDir + '/local/[artifact]-[revision](-[classifier]).[ext]' | 430 artifactPattern gradle.ivyUserDir + '/local/[artifact]-[revision](-[classifier]).[ext]' |
421 ivyPattern gradle.ivyUserDir + "/local/[module]-ivy-[revision].xml" | 431 ivyPattern gradle.ivyUserDir + "/local/[module]-ivy-[revision].xml" |
422 } | 432 } |