aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com>2018-06-12 23:45:58 -0400
committerNelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com>2018-06-12 23:47:42 -0400
commitc41a62d5c57ff2e6a494e0f0169b6f439de74ae5 (patch)
tree8da1082baec3ce79a34a0f18c2fc5fd1daf8f989
parent06daf7376ddd83e29053319edc04ea7c1973a081 (diff)
Fix Docker, so it builds.
Dockerfile updates to support maven build. Update pom to support Docker build via Profile. Issue-ID: MUSIC-77 Change-Id: I187bec354c799b036457c3d535ed6eb34f4e83b1 Signed-off-by: Nelson,Thomas(tn1381)(arthurdent3) <tn1381@att.com>
-rw-r--r--.maven-dockerignore1
-rw-r--r--Dockerfile8
-rw-r--r--pom.xml93
-rw-r--r--version.properties2
4 files changed, 99 insertions, 5 deletions
diff --git a/.maven-dockerignore b/.maven-dockerignore
new file mode 100644
index 0000000..07fa861
--- /dev/null
+++ b/.maven-dockerignore
@@ -0,0 +1 @@
+target/docker/
diff --git a/Dockerfile b/Dockerfile
index 63621cc..9e04ffa 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,7 +1,8 @@
FROM library/ubuntu:latest
+# Was this necessary? Removed for now.
+# apt-get upgrade -y && \
RUN apt-get update && \
- apt-get upgrade -y && \
apt-get install -y software-properties-common && \
add-apt-repository ppa:webupd8team/java -y && \
apt-get update && \
@@ -18,8 +19,9 @@ RUN pip install requests
#RUN apt-get update && \
# apt-get install -y vim
-
-COPY target/prom.jar sampleApp/startPromDaemon.sh sampleApp/promoverride.py /app/
+# Chnaged to suppor Maven Docker.
+#COPY target/prom.jar sampleApp/startPromDaemon.sh sampleApp/promoverride.py /app/
+COPY maven/ sampleApp/startPromDaemon.sh sampleApp/promoverride.py /app/
WORKDIR /app
CMD ./startPromDaemon.sh -i $ID -c /opt/app/prom/ $PASSIVE -z
diff --git a/pom.xml b/pom.xml
index b8faa9f..323a502 100644
--- a/pom.xml
+++ b/pom.xml
@@ -25,7 +25,7 @@ stated inside of the file.
<modelVersion>4.0.0</modelVersion>
<groupId>org.onap.music.prom</groupId>
<artifactId>prom</artifactId>
- <version>1.0.2</version>
+ <version>1.0.3</version>
<parent>
<groupId>org.onap.oparent</groupId>
<artifactId>oparent</artifactId>
@@ -133,5 +133,96 @@ stated inside of the file.
</plugin>
</plugins>
</build>
+ <profiles>
+ <profile>
+ <id>docker</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.fabric8</groupId>
+ <artifactId>docker-maven-plugin</artifactId>
+ <version>0.19.1</version>
+ <dependencies>
+ <dependency>
+ <groupId>com.github.jnr</groupId>
+ <artifactId>jnr-unixsocket</artifactId>
+ <version>0.13</version>
+ </dependency>
+ </dependencies>
+ <configuration>
+ <verbose>true</verbose>
+ <apiVersion>1.23</apiVersion>
+ <registry>nexus3.onap.org:10003</registry>
+ <images>
+ <!-- MUSIC War -->
+ <image>
+ <name>onap/music/prom</name>
+ <alias>docker_music</alias>
+ <build>
+ <cleanup>true</cleanup>
+ <tags>
+ <tag>${docker.tag}</tag>
+ <tag>${docker.latest.tag}</tag>
+ </tags>
+ <dockerFileDir>${project.basedir}</dockerFileDir>
+ <assembly>
+ <descriptorRef>artifact</descriptorRef>
+ </assembly>
+ </build>
+ </image>
+ </images>
+ </configuration>
+ <executions>
+ <execution>
+ <id>clean-images</id>
+ <phase>pre-clean</phase>
+ <goals>
+ <goal>remove</goal>
+ </goals>
+ <configuration>
+ <removeAll>true</removeAll>
+ <image>music</image>
+ </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>push</goal>
+ </goals>
+ <configuration>
+ <image>onap/music/music</image>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+ <distributionManagement>
+ <repository>
+ <id>ecomp-releases</id>
+ <name>Release Repository</name>
+ <url>${nexusproxy}/${releaseNexusPath}</url>
+ </repository>
+ <snapshotRepository>
+ <id>ecomp-snapshots</id>
+ <name>Snapshot Repository</name>
+ <url>${nexusproxy}/${snapshotNexusPath}</url>
+ </snapshotRepository>
+ <!-- added for javadoc -->
+ <site>
+ <id>ecomp-site</id>
+ <url>dav:${nexusproxy}${sitePath}</url>
+ </site>
+ </distributionManagement>
</project>
diff --git a/version.properties b/version.properties
index 359ebb9..45d5a51 100644
--- a/version.properties
+++ b/version.properties
@@ -4,7 +4,7 @@
major=1
minor=0
-patch=2
+patch=3
base_version=${major}.${minor}.${patch}