aboutsummaryrefslogtreecommitdiffstats
path: root/cps-tbdmt-parent
diff options
context:
space:
mode:
authorNiranjana <niranjana.y60@wipro.com>2022-04-26 05:32:12 +0000
committerNiranjana Y <niranjana.y60@wipro.com>2022-05-04 07:47:47 +0000
commit766de31465bb0db62eb6692723ff8d0ee707da33 (patch)
tree7c0a78ba70fb79784a4546773c7697b3710408d0 /cps-tbdmt-parent
parentd18b9825aa86262c37c13479697e3e0b108899cc (diff)
Add configurations to build and push snapshot image to nexus repository
Issue-ID: CPS-978 Signed-off-by: Niranjana <niranjana.y60@wipro.com> Change-Id: I5233b05856b50ad540bb0922a821e845f119ad6a
Diffstat (limited to 'cps-tbdmt-parent')
-rw-r--r--cps-tbdmt-parent/pom.xml42
1 files changed, 42 insertions, 0 deletions
diff --git a/cps-tbdmt-parent/pom.xml b/cps-tbdmt-parent/pom.xml
index f50e4a8..2466a81 100644
--- a/cps-tbdmt-parent/pom.xml
+++ b/cps-tbdmt-parent/pom.xml
@@ -16,6 +16,12 @@
<packaging>pom</packaging>
<properties>
+ <app>org.onap.cps.tbdmt.Application</app>
+ <docker.repository.pull>nexus3.onap.org:10001/</docker.repository.pull>
+ <docker.repository.push>nexus3.onap.org:10003/</docker.repository.push>
+ <image.base>${docker.repository.pull}onap/integration-java11:8.0.0</image.base>
+ <image.name>${docker.repository.push}onap/cps-tbdmt</image.name>
+ <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
<cps.version>1.0.0</cps.version>
<java.version>11</java.version>
<minimum-coverage>0.9</minimum-coverage>
@@ -331,6 +337,42 @@
</executions>
</plugin>
<plugin>
+ <groupId>com.google.cloud.tools</groupId>
+ <artifactId>jib-maven-plugin</artifactId>
+ <version>3.0.0</version>
+ <configuration>
+ <container>
+ <mainClass>${app}</mainClass>
+ <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
+ </container>
+ <from>
+ <image>${image.base}</image>
+ </from>
+ <to>
+ <tags>
+ <tag>latest</tag>
+ </tags>
+ <image>${image.name}:${project.version}-${maven.build.timestamp}</image>
+ </to>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <id>build</id>
+ <goals>
+ <goal>dockerBuild</goal>
+ </goals>
+ </execution>
+ <execution>
+ <phase>deploy</phase>
+ <id>buildAndPush</id>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
</plugin>