aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Forsyth <jf2512@att.com>2019-08-22 20:29:51 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-22 20:29:51 +0000
commitb6f957e116e9d2bf9147730a658fc519989a5592 (patch)
treef01f10b1a6b9f71479eb7e49d0e46dcc433673d8
parent46a43db79cd709a12c5f6f71acd1379a67061395 (diff)
parentef10c8f449f0350bcfe30499785ec04e779174aa (diff)
Merge "Update the pom to create staging latest tag"
-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>