aboutsummaryrefslogtreecommitdiffstats
path: root/ms/sliboot/TagVersion.groovy
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-06-05 15:46:39 -0400
committerKAPIL SINGAL <ks220y@att.com>2020-06-09 14:24:12 +0000
commit31172d602ff8bce4b4680c3a2da58b6db2e8d9f0 (patch)
treebf66bc083d8f1a46c17132c990c7e725e828514d /ms/sliboot/TagVersion.groovy
parentc2fac23347ee5dd3f8b6e3180a0206eb979b965e (diff)
Refactor sliapi springboot
Moved sli-api springboot microservice from ccsdk/sli/core to ccsdk/apps Change-Id: Ibecae568cf90b71575403052111e7be9ff543376 Issue-ID: CCSDK-2096 Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'ms/sliboot/TagVersion.groovy')
-rw-r--r--ms/sliboot/TagVersion.groovy41
1 files changed, 41 insertions, 0 deletions
diff --git a/ms/sliboot/TagVersion.groovy b/ms/sliboot/TagVersion.groovy
new file mode 100644
index 00000000..68a8b780
--- /dev/null
+++ b/ms/sliboot/TagVersion.groovy
@@ -0,0 +1,41 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP CCSDK
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END============================================
+ * ===================================================================
+ *
+ */
+
+package org.onap.ccsdk.distribution
+
+
+def versionArray;
+if ( project.properties['ccsdk.project.version'] != null ) {
+ versionArray = project.properties['ccsdk.project.version'].split('\\.');
+}
+
+if ( project.properties['ccsdk.project.version'].endsWith("-SNAPSHOT") ) {
+ patchArray = versionArray[2].split('-');
+ project.properties['project.docker.latestminortag.version']=versionArray[0] + '.' + versionArray[1] + "-SNAPSHOT-latest";
+ project.properties['project.docker.latestfulltag.version']=versionArray[0] + '.' + versionArray[1] + '.' + patchArray[0] + "-SNAPSHOT-latest";
+ project.properties['project.docker.latesttagtimestamp.version']=versionArray[0] + '.' + versionArray[1] + '.' + patchArray[0] + "-SNAPSHOT-"+project.properties['ccsdk.build.timestamp'];
+} else {
+ project.properties['project.docker.latestminortag.version']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
+ project.properties['project.docker.latestfulltag.version']=versionArray[0] + '.' + versionArray[1] + '.' + versionArray[2] + "-STAGING-latest";
+ project.properties['project.docker.latesttagtimestamp.version']=versionArray[0] + '.' + versionArray[1] + '.' + versionArray[2] + "-STAGING-"+project.properties['ccsdk.build.timestamp'];
+}