diff options
author | Ethan Lynn <ethanlynnl@vmware.com> | 2019-07-17 14:43:53 +0800 |
---|---|---|
committer | Ethan Lynn <ethanlynnl@vmware.com> | 2019-07-17 14:44:20 +0800 |
commit | 87f13c9218b0db92a18cd145d3ff98ad593e57ba (patch) | |
tree | baceb5c46f87e98ca990362c35b065aead257c4e | |
parent | a45438d411aa4517fe537361f1efd45b8d8ce70b (diff) |
Add docker profile in pom
Add docker profile in VIO pom
Change-Id: Ia0073a5ec92288ef980e05dcaefca5d9d7b4dc8c
Issue-ID: MULTICLOUD-706
Signed-off-by: Ethan Lynn <ethanlynnl@vmware.com>
-rw-r--r-- | vio/pom.xml | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/vio/pom.xml b/vio/pom.xml index f5bd9c9..ce9f502 100644 --- a/vio/pom.xml +++ b/vio/pom.xml @@ -54,4 +54,76 @@ </plugins> </build> + <profiles> + <profile> + <id>docker</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>3.1.0</version> + <executions> + <execution> + <id>copy-resources</id> + <phase>validate</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${project.basedir}/docker_target</outputDirectory> + <resources> + <resource> + <directory>${project.basedir}/docker</directory> + <filtering>true</filtering> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.6</version> + <executions> + <execution> + <phase>install</phase> + <inherited>false</inherited> + <configuration> + <target> + <exec executable="docker"> + <arg value="build"/> + <arg value="-t"/> + <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/vio:${project.version}"/> + <arg value="docker_target"/> + </exec> + <exec executable="docker"> + <arg value="tag"/> + <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/vio:${project.version}"/> + <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/vio:latest"/> + </exec> + <exec executable="docker"> + <arg value="push"/> + <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/vio:${project.version}"/> + </exec> + <exec executable="docker"> + <arg value="push"/> + <arg value="${CONTAINER_PUSH_REGISTRY}/onap/multicloud/vio:latest"/> + </exec> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + </profile> + </profiles> </project> |