summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cps-parent/pom.xml67
1 files changed, 51 insertions, 16 deletions
diff --git a/cps-parent/pom.xml b/cps-parent/pom.xml
index 643d2cc63f..ea979b1b94 100644
--- a/cps-parent/pom.xml
+++ b/cps-parent/pom.xml
@@ -27,6 +27,57 @@
<tag.version>${project.version}</tag.version>
</properties>
+ <profiles>
+ <profile>
+ <id>Docker</id>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>com.google.cloud.tools</groupId>
+ <artifactId>jib-maven-plugin</artifactId>
+ <version>${jib-maven-plugin.version}</version>
+ <configuration>
+ <container>
+ <mainClass>${app}</mainClass>
+ <creationTime>USE_CURRENT_TIMESTAMP</creationTime>
+ </container>
+ <from>
+ <image>${base.image}</image>
+ </from>
+ <to>
+ <image>${repository.name}</image>
+ <tags>
+ <tag>${tag.version}</tag>
+ </tags>
+ </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>
+ </profile>
+ </profiles>
+
<dependencyManagement>
<dependencies>
<dependency>
@@ -197,22 +248,6 @@
</tags>
</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>
</build>