summaryrefslogtreecommitdiffstats
path: root/cps-parent/pom.xml
diff options
context:
space:
mode:
authorClaudio David Gasparini <claudio.gasparini@pantheon.tech>2020-11-08 22:18:36 +0100
committerClaudio David Gasparini <claudio.gasparini@pantheon.tech>2020-11-10 11:54:44 +0000
commit900ba02f458b3b7adc593f57d1e7447ce6cce142 (patch)
treec3b404b9237d918940a8d681ebbf92154bbe28bc /cps-parent/pom.xml
parent1bd1c6c8ad38d1df70f93c25f82321faa06ae8fc (diff)
Dockerize the service
- automatically generate docker image - provide docker-compose to start the service together with dockerized postgres db Issue-ID: CPS-22 Signed-off-by: Claudio David Gasparini <claudio.gasparini@pantheon.tech> Change-Id: I846d14e87de50bfb1411e0c9b49e9f6c6cc8ebda
Diffstat (limited to 'cps-parent/pom.xml')
-rw-r--r--cps-parent/pom.xml42
1 files changed, 42 insertions, 0 deletions
diff --git a/cps-parent/pom.xml b/cps-parent/pom.xml
index 0fe2e101a5..ea9c98af66 100644
--- a/cps-parent/pom.xml
+++ b/cps-parent/pom.xml
@@ -16,10 +16,15 @@
<packaging>pom</packaging>
<properties>
+ <app>org.onap.cps.Application</app>
+ <base.image>openjdk:11-jre-slim</base.image>
<java.version>11</java.version>
+ <jib-maven-plugin.version>2.6.0</jib-maven-plugin.version>
<oparent.version>3.1.0</oparent.version>
+ <repository.name>nexus3.onap.org:10001/onap/cps-service</repository.name>
<spring-boot-maven-plugin.version>2.3.3.RELEASE</spring-boot-maven-plugin.version>
<swagger-codegen-maven-plugin.version>3.0.18</swagger-codegen-maven-plugin.version>
+ <tag.version>${project.version}</tag.version>
</properties>
<dependencyManagement>
@@ -173,6 +178,43 @@
</includes>
</configuration>
</plugin>
+ <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>
+ <!-- FIXME Enable this once migrated to onap,
+ <execution>
+ <phase>deploy</phase>
+ <id>buildAndPush</id>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>-->
+ </executions>
+ </plugin>
</plugins>
</build>
</project> \ No newline at end of file