Update pom file of vfc-nfvo-lcm 43/9843/1
authorfujinhua <fu.jinhua@zte.com.cn>
Fri, 1 Sep 2017 04:18:50 +0000 (12:18 +0800)
committerfujinhua <fu.jinhua@zte.com.cn>
Fri, 1 Sep 2017 04:18:50 +0000 (12:18 +0800)
Add docker build and push profile

Change-Id: Ia8ae79798ffdf4e49a17aa137dce724ad4d75c38
Issue-Id: VFC-217
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
pom.xml

diff --git a/pom.xml b/pom.xml
index d921409..54d726c 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         </plugin>
       </plugins>
     </build>
+    <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <version>0.16.5</version>
+                        <inherited>false</inherited>
+                        <configuration>
+                            <images>
+                                <image>
+                                    <name>onap/vfc/nslcm</name>
+                                    <build>
+                                        <cleanup>try</cleanup>
+                                        <dockerFileDir>${basedir}/docker/</dockerFileDir>
+                                        <dockerFile>${basedir}/docker/Dockerfile</dockerFile>
+                                        <tags>
+                                            <tag>${project.version}-STAGING-latest</tag>
+                                        </tags>
+                                    </build>
+                                </image>
+                            </images>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>generate-images</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                            </execution>
+                            <execution>
+                                <id>push-images</id>
+                                <phase>deploy</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                    <goal>push</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>