summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsunil unnava <sunil.unnava@att.com>2019-02-13 17:40:39 -0500
committersunil unnava <sunil.unnava@att.com>2019-02-13 17:41:19 -0500
commit413da52a6cfd376abea7f1c1342edfd105c37ff4 (patch)
tree8d7f0f56425231b329c8b65d7d4a6f2e8ef9ad1b
parent2c1708472681d6dd3c03d05f347523a70a990904 (diff)
update docker image tags
Issue-ID: DMAAP-1042 Change-Id: If2e828087f84573d27cebfe37c626739e77d7a19 Signed-off-by: sunil unnava <sunil.unnava@att.com>
-rw-r--r--pom.xml56
-rw-r--r--version.properties2
2 files changed, 48 insertions, 10 deletions
diff --git a/pom.xml b/pom.xml
index e47c8c0..59084ae 100644
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
<groupId>org.onap.dmaap.kafka</groupId>
<artifactId>kafka11aaf</artifactId>
- <version>0.0.3-SNAPSHOT</version>
+ <version>0.0.4-SNAPSHOT</version>
<name>dmaap-kafka11aaf</name>
<licenses>
<license>
@@ -192,10 +192,9 @@
<dockerDirectory>src/main/docker</dockerDirectory>
<serverId>docker-hub</serverId>
<imageTags>
- <imageTag>${KafkaImg}</imageTag>
- <imageTag>latest</imageTag>
+ <imageTag>${dockertag1}</imageTag>
+ <imageTag>${dockertag2}</imageTag>
</imageTags>
- <forceTags>true</forceTags>
<resources>
<!-- <resource> <targetPath>/</targetPath> <directory>${dockerLocation}</directory>
<include>${project.build.finalName}.jar</include> </resource> -->
@@ -231,7 +230,7 @@
</goals>
<configuration>
<image>onap/dmaap/kafka01101</image>
- <newName>${docker.push.registry}/onap/dmaap/kafka01101:${KafkaImg}</newName>
+ <newName>${docker.push.registry}/onap/dmaap/kafka01101:${dockertag2}</newName>
<skipDockerTag>${skip.docker.push}</skipDockerTag>
</configuration>
</execution>
@@ -244,7 +243,7 @@
</goals>
<configuration>
<image>onap/dmaap/kafka01101</image>
- <newName>${docker.push.registry}/onap/dmaap/kafka01101:latest</newName>
+ <newName>${docker.push.registry}/onap/dmaap/kafka01101:${dockertag1}</newName>
<skipDockerTag>${skip.docker.push}</skipDockerTag>
</configuration>
</execution>
@@ -256,7 +255,7 @@
<goal>push</goal>
</goals>
<configuration>
- <imageName>${docker.push.registry}/onap/dmaap/kafka01101:${KafkaImg}</imageName>
+ <imageName>${docker.push.registry}/onap/dmaap/kafka01101:${dockertag2}</imageName>
<skipDockerPush>${skip.docker.push}</skipDockerPush>
</configuration>
</execution>
@@ -268,7 +267,7 @@
<goal>push</goal>
</goals>
<configuration>
- <imageName>${docker.push.registry}/onap/dmaap/kafka01101:latest</imageName>
+ <imageName>${docker.push.registry}/onap/dmaap/kafka01101:${dockertag1}</imageName>
<skipDockerPush>${skip.docker.push}</skipDockerPush>
</configuration>
</execution>
@@ -304,7 +303,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <KafkaImg>0.0.3</KafkaImg>
+ <timestamp>${maven.build.timestamp}</timestamp>
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
<sitePath>/content/sites/site/org/onap/dmaap/kafka0111/${project.artifactId}/${project.version}</sitePath>
<skip.docker.build>true</skip.docker.build>
<skip.docker.push>true</skip.docker.push>
@@ -379,6 +379,44 @@
<skip.docker.tag>false</skip.docker.tag>
<skip.docker.push>false</skip.docker.push>
</properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <properties>
+ <ver>${project.version}</ver>
+ <timestamp>${maven.build.timestamp}</timestamp>
+ </properties>
+ <source>
+ println project.properties['ver'];
+ def versionArray;
+ if ( project.properties['ver'] != null ) {
+ versionArray = project.properties['ver'].split('\\.');
+ }
+ if ( project.properties['ver'].endsWith("-SNAPSHOT") ) {
+ project.properties['dockertag1']=project.properties['ver'] + "-latest";
+ project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
+ } else {
+ project.properties['dockertag1']=versionArray[0] + '.' + versionArray[1] + "-STAGING-latest";
+ project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
+ }
+ println 'docker tag 1: ' + project.properties['dockertag1'];
+ println 'docker tag 2: ' + project.properties['dockertag2'];
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
</profile>
</profiles>
diff --git a/version.properties b/version.properties
index a34946a..2ec675c 100644
--- a/version.properties
+++ b/version.properties
@@ -26,7 +26,7 @@
major=0
minor=0
-patch=3
+patch=4
base_version=${major}.${minor}.${patch}