aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Lund <lund@research.att.com>2017-03-24 15:37:18 +0000
committerCarsten Lund <lund@research.att.com>2017-03-24 15:37:18 +0000
commitcfea648ceda1d82e329438702a7652ac3d30e96a (patch)
tree561d028b9ad75dd0088c50fbc3c8b2d4c59aff37
parent6545a442167fc378044098fe0e67e9c03c45180a (diff)
[DCAE-1] setup DOCKER-VERSION variable
Change-Id: Ia25e10ca61c5e2a7608629ad10cebb68568275ee Signed-off-by: Carsten Lund <lund@research.att.com>
-rw-r--r--dcae-controller-core/dcae-controller-platform-server/src/main/server/scripts/rackspace-substitute.groovy11
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) {