diff options
author | Bin Yang <bin.yang@windriver.com> | 2019-07-12 10:54:37 +0000 |
---|---|---|
committer | Bin Yang <bin.yang@windriver.com> | 2019-07-15 06:46:36 +0000 |
commit | cf974e1ceb44987d78f57559f23c0a71be52f3c7 (patch) | |
tree | 120f5eb1be4d1a00609d16fc3bf5b3dc9e744375 | |
parent | 463eb41dc371cc857d058b0ae22bdeab64f1f7e3 (diff) |
Add docker profile for maven-docker-stage job
Change-Id: I1f1e66cf283288af088232f8c74b0d8c7062b25f
Issue-ID: MULTICLOUD-704
Signed-off-by: Bin Yang <bin.yang@windriver.com>
-rw-r--r-- | windriver/pom.xml | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/windriver/pom.xml b/windriver/pom.xml index 5e27bd54..9aa31794 100644 --- a/windriver/pom.xml +++ b/windriver/pom.xml @@ -113,4 +113,74 @@ </plugin> </plugins> </build> + <profiles> + <profile> + <id>docker</id> + <build> + <plugins> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <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="nexus3.onap.org:10003/onap/multicloud/openstack-windriver:${project.version}"/> + <arg value="docker_target"/> + </exec> + <exec executable="docker"> + <arg value="tag"/> + <arg value="nexus3.onap.org:10003/onap/multicloud/openstack-windriver:${project.version}"/> + <arg value="nexus3.onap.org:10003/onap/multicloud/openstack-windriver:latest"/> + </exec> + <exec executable="docker"> + <arg value="push"/> + <arg value="nexus3.onap.org:10003/onap/multicloud/openstack-windriver:${project.version}"/> + </exec> + <exec executable="docker"> + <arg value="push"/> + <arg value="nexus3.onap.org:10003/onap/multicloud/openstack-windriver:latest"/> + </exec> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> + <activation> + <activeByDefault>false</activeByDefault> + </activation> + </profile> + </profiles> </project> |