Fix for cps-ncmp-dmi-plugin-maven-merge-master job

Issue-ID: CPS-2496
Change-Id: I66f3a215188eed6dd7c83a52ce831d97f9c0db46
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
diff --git a/pom.xml b/pom.xml
index f8d34c5..e89e1f8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -47,6 +47,12 @@
 
     <properties>
         <cps.version>3.5.2</cps.version>
+        <app>org.onap.cps.ncmp.dmi.Application</app>
+        <base.image>${docker.pull.registry}/onap/integration-java17:12.0.0</base.image>
+        <image.tag>${project.version}-${maven.build.timestamp}</image.tag>
+        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss'Z'</maven.build.timestamp.format>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <image.name>ncmp-dmi-plugin</image.name>
     </properties>
 
     <build>
@@ -123,6 +129,65 @@
                 </dependencies>
             </plugin>
         </plugins>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>com.google.cloud.tools</groupId>
+                    <artifactId>jib-maven-plugin</artifactId>
+                    <version>3.3.2</version>
+                    <configuration>
+                        <container>
+                            <mainClass>${app}</mainClass>
+                            <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
+                        </container>
+                        <from>
+                            <image>${base.image}</image>
+                        </from>
+                        <to>
+                            <tags>
+                                <tag>latest</tag>
+                                <tag>${project.version}-latest</tag>
+                            </tags>
+                            <image>${docker.push.registry}/onap/${image.name}:${image.tag}</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>
+            </plugins>
+        </pluginManagement>
     </build>
 
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>com.google.cloud.tools</groupId>
+                        <artifactId>jib-maven-plugin</artifactId>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+    </profiles>
+
 </project>