From 2f7c6682e08900e6e0e80624188aebcc243b2fa6 Mon Sep 17 00:00:00 2001 From: Carsten Lund Date: Fri, 24 Mar 2017 15:37:18 +0000 Subject: [DCAE-1] setup DOCKER-VERSION variable Change-Id: Ia25e10ca61c5e2a7608629ad10cebb68568275ee Signed-off-by: Carsten Lund (cherry picked from commit cfea648ceda1d82e329438702a7652ac3d30e96a) --- .../src/main/server/scripts/rackspace-substitute.groovy | 11 +++++++++++ 1 file changed, 11 insertions(+) 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) { -- cgit 1.2.3-korg