RM-6377 Modified poms to have custom releases for enterprise and community

This commit is contained in:
Elena Hardon
2018-07-05 16:43:31 +03:00
parent c738bd1d92
commit c0d1531712
2 changed files with 71 additions and 6 deletions

52
pom.xml
View File

@@ -343,10 +343,10 @@
</build> </build>
</profile> </profile>
<!-- Profile used to build and push docker images with project.version tag to the given image registry (quay.io) and
hub.docker --> <!-- Profile used to build and push docker images with project.version tag to hub.docker when the community deploy goal encounters-->
<profile> <profile>
<id>release</id> <id>release-enterprise</id>
<build> <build>
<pluginManagement> <pluginManagement>
<plugins> <plugins>
@@ -380,6 +380,52 @@
</pluginManagement> </pluginManagement>
</build> </build>
</profile> </profile>
<!-- Profile used to build and push docker images with project.version tag to both image registries quay.io and hub.docker when
the enterprise deploy goal encounters-->
<profile>
<id>release-community</id>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${fabric8.maven.version}</version>
<configuration>
<images>
<image>
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
<images>
<image>
<name>${image.name}:${project.version}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</images>
</configuration>
<executions>
<execution>
<id>build-push-image</id>
<phase>deploy</phase>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles> </profiles>
<properties> <properties>

View File

@@ -698,13 +698,21 @@
</build> </build>
</profile> </profile>
<profile> <profile>
<id>release</id> <id>release-community</id>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>io.fabric8</groupId> <groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId> <artifactId>fabric8-maven-plugin</artifactId>
<configuration> <configuration>
<images>
<image>
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
<images> <images>
<image> <image>
<name>${image.name}:${project.version}</name> <name>${image.name}:${project.version}</name>
@@ -713,7 +721,18 @@
</build> </build>
</image> </image>
</images> </images>
</images>
</configuration> </configuration>
<executions>
<execution>
<id>build-push-image</id>
<phase>deploy</phase>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>