summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pom.xml76
-rw-r--r--src/main/docker/Dockerfile12
2 files changed, 80 insertions, 8 deletions
diff --git a/pom.xml b/pom.xml
index 979afec..54e8e17 100644
--- a/pom.xml
+++ b/pom.xml
@@ -19,6 +19,11 @@
<java.version>1.8</java.version>
<dmaap.client.version>1.1.5</dmaap.client.version>
<aai.rest.client.version>1.2.1</aai.rest.client.version>
+ <!--docker-->
+ <docker.tag>${project.version}-${timestamp}</docker.tag>
+ <docker.latest.tag>${project.version}-latest</docker.latest.tag>
+ <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
+ <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
</properties>
<dependencyManagement>
@@ -149,7 +154,7 @@
</execution>
</executions>
</plugin>
- <plugin>
+ <!--<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.11</version>
@@ -170,7 +175,7 @@
</imageTags>
<forceTags>true</forceTags>
</configuration>
- </plugin>
+ </plugin>-->
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
@@ -195,4 +200,71 @@
</resource>
</resources>
</build>
+
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.19.1</version>
+ <configuration>
+ <verbose>true</verbose>
+ <apiVersion>1.23</apiVersion>
+ <pullRegistry>${docker.pull.registry}</pullRegistry>
+ <pushRegistry>${docker.push.registry}</pushRegistry>
+ <dockerHost>${docker.pull.registry}</dockerHost>
+ <images>
+ <image>
+ <name>onap/${project.artifactId}</name>
+ <alias>${project.artifactId}</alias>
+ <build>
+ <cleanup>true</cleanup>
+ <tags>
+ <tag>${docker.snapshot.tag}</tag>
+ <tag>${docker.latest.tag}</tag>
+ </tags>
+ <dockerFileDir>${project.basedir}/src/main/docker</dockerFileDir>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>clean-images</id>
+ <phase>pre-clean</phase>
+ <goals>
+ <goal>remove</goal>
+ </goals>
+ <configuration>
+ <removeAll>true</removeAll>
+ </configuration>
+ </execution>
+
+ <execution>
+ <id>generate-images</id>
+ <phase>package</phase>
+ <goals>
+ <goal>build</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>push-images</id>
+ <phase>deploy</phase>
+ <goals>
+ <goal>build</goal>
+ <goal>push</goal>
+ </goals>
+ <configuration>
+ <image>onap/vvp/cms</image>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
</project> \ No newline at end of file
diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile
index 0cdd1cf..a764fbf 100644
--- a/src/main/docker/Dockerfile
+++ b/src/main/docker/Dockerfile
@@ -8,12 +8,12 @@ RUN mkdir -p $MICROSERVICE_HOME/config/
RUN mkdir -p $MICROSERVICE_HOME/lib/
RUN mkdir -p $MICROSERVICE_HOME/bin/
-ADD target/pomba-context-aggregator.jar $MICROSERVICE_HOME/lib/
-COPY config/ $MICROSERVICE_HOME/config/
-ADD target/startService.sh $MICROSERVICE_HOME/bin/
+#ADD ./target/pomba-context-aggregator.jar $MICROSERVICE_HOME/lib/
+#COPY ./config/ $MICROSERVICE_HOME/config/
+#ADD ./target/startService.sh $MICROSERVICE_HOME/bin/
-RUN chmod 755 $MICROSERVICE_HOME/config/*
-RUN chmod 755 $MICROSERVICE_HOME/lib/*
-RUN chmod 755 $MICROSERVICE_HOME/bin/*
+#RUN chmod 755 $MICROSERVICE_HOME/config/*
+#RUN chmod 755 $MICROSERVICE_HOME/lib/*
+#RUN chmod 755 $MICROSERVICE_HOME/bin/*
CMD ["/opt/app/bin/startServer.sh"]