diff options
author | Carsten Lund <lund@research.att.com> | 2017-03-24 15:37:18 +0000 |
---|---|---|
committer | Carsten Lund <lund@research.att.com> | 2017-03-24 17:51:11 +0000 |
commit | 2f7c6682e08900e6e0e80624188aebcc243b2fa6 (patch) | |
tree | b6f6bc3a1bf98d3776cfae70370d46baa24520e4 /dcae-controller-core/dcae-controller-platform-server | |
parent | 5259ae4649f7b55ed6d711d2739bcce2924ab9dc (diff) |
[DCAE-1] setup DOCKER-VERSION variable
Change-Id: Ia25e10ca61c5e2a7608629ad10cebb68568275ee
Signed-off-by: Carsten Lund <lund@research.att.com>
(cherry picked from commit cfea648ceda1d82e329438702a7652ac3d30e96a)
Diffstat (limited to 'dcae-controller-core/dcae-controller-platform-server')
-rw-r--r-- | dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/rackspace-substitute.groovy | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/rackspace-substitute.groovy b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/rackspace-substitute.groovy index 855e151..dd545b8 100644 --- a/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/rackspace-substitute.groovy +++ b/dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/rackspace-substitute.groovy @@ -50,6 +50,17 @@ def m = yaml.load(f.text) if (m['POLICY-IP'] == null) m['POLICY-IP'] = "10.0.6.1" +def i = m["DCAE-VERSION"].lastIndexOf(".") + +if (m['DCAE-VERSION'].contains("SNAPSHOT")) { + m['DOCKER-VERSION'] = "${m["DCAE-VERSION"].substring(0,i)}-SNAPSHOT-latest" +} +else { + m['DOCKER-VERSION'] = "${m["DCAE-VERSION"].substring(0,i)}-STAGING-latest" +} + +println "m['DOCKER-VERSION'] = ${m['DOCKER-VERSION']}" + fromDir.eachFileRecurse (FileType.FILES) { file -> def ofile = new File(file.toString().replace(options.from, options.to)) switch (file.name) { |