aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKajur, Harish (vk250x) <vk250x@att.com>2019-08-22 13:57:12 -0400
committerKajur, Harish (vk250x) <vk250x@att.com>2019-08-22 13:57:19 -0400
commitef10c8f449f0350bcfe30499785ec04e779174aa (patch)
treef0b6287ac2228f32d511343e887df06e3cfe3c94
parent7c03e5855fb667a01d9375b445c4a04919bd1dbb (diff)
Update the pom to create staging latest tag
Issue-ID: AAI-2579 Change-Id: Ia303e66c28e62999cb810576fdc4bfdc9ed086b5 Signed-off-by: Kajur, Harish (vk250x) <vk250x@att.com>
-rw-r--r--pom.xml14
1 files changed, 14 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index 698de2c..bdc8a53 100644
--- a/pom.xml
+++ b/pom.xml
@@ -53,6 +53,8 @@ limitations under the License.
<aai.docker.namespace>onap</aai.docker.namespace>
<aai.base.image>alpine</aai.base.image>
<aai.base.image.version>1.6.0</aai.base.image.version>
+ <!-- This will be used for the docker images as the default format of maven build has issues -->
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
</properties>
<dependencyManagement>
@@ -399,6 +401,16 @@ limitations under the License.
}
log.info 'Base image flavour: ' + project.properties['aai.base.image']
log.info 'Base image version: ' + project.properties['aai.base.image.version']
+
+ def versionArray;
+ if (project.properties['aai.base.image.version'] != null) {
+ versionArray = project.properties['aai.base.image.version'].split('\\.');
+ }
+
+ project.properties["project.major.version"] = versionArray[0];
+ project.properties["project.minor.version"] = versionArray[1];
+ project.properties['project.docker.latesttag.version'] = versionArray[0] + '.' + versionArray[1] + '-STAGING-latest';
+ println 'New Tag for docker:' + project.properties['project.docker.latesttag.version'];
</source>
</configuration>
</execution>
@@ -419,6 +431,8 @@ limitations under the License.
<filter>@</filter>
<tags>
<tag>latest</tag>
+ <tag>${project.docker.latesttag.version}</tag>
+ <tag>${project.major.version}.${project.minor.version}-STAGING-${maven.build.timestamp}</tag>
</tags>
<cleanup>try</cleanup>
<dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>