summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicholas Soteropoulos <ns299g@us.att.com>2020-09-29 13:44:27 -0400
committerNicholas Soteropoulos <ns299g@us.att.com>2020-10-01 12:04:57 -0400
commitcd2b9a392a6a77dd40703a861999144ee0b3413c (patch)
treef755f1155bf9763a919e4745a3659df1327bf551
parent457685063fd4b960441e482cc8b88fa8c972a7d2 (diff)
updating docker repository to onap nexus
Change-Id: I542aa09dde0dbcd54b69e2bfbce593bfcfb849c6 Issue-ID: DCAEGEN2-2317 Signed-off-by: Nicholas Soteropoulos <ns299g@us.att.com>
-rw-r--r--mod2/ui/Dockerfile2
-rw-r--r--mod2/ui/pom.xml48
2 files changed, 35 insertions, 15 deletions
diff --git a/mod2/ui/Dockerfile b/mod2/ui/Dockerfile
index 67744d4..904c656 100644
--- a/mod2/ui/Dockerfile
+++ b/mod2/ui/Dockerfile
@@ -1,5 +1,5 @@
# ---- Base Node ----
-FROM alpine:12.4.0 AS base
+FROM node:12.4.0-alpine AS base
#RUN fs.inotify.max_user_watches=524288
diff --git a/mod2/ui/pom.xml b/mod2/ui/pom.xml
index 50122de..b2e887e 100644
--- a/mod2/ui/pom.xml
+++ b/mod2/ui/pom.xml
@@ -32,40 +32,60 @@
<artifactId>ui</artifactId>
<version>1.0.0-SNAPSHOT</version>
+ <properties>
+ <dockerfile-maven-plugin.version>1.4.10</dockerfile-maven-plugin.version>
+ <docker.image.name>onap/${project.groupId}.${project.artifactId}</docker.image.name>
+ </properties>
+
<build>
<plugins>
<plugin>
- <groupId>com.github.eirslett</groupId>
- <artifactId>frontend-maven-plugin</artifactId>
- <version>1.7.6</version>
+ <groupId>com.spotify</groupId>
+ <artifactId>dockerfile-maven-plugin</artifactId>
+ <version>${dockerfile-maven-plugin.version}</version>
<configuration>
- <workingDirectory>./</workingDirectory>
- <nodeVersion>v12.16.1</nodeVersion>
- <npmVersion>6.13.4</npmVersion>
+ <contextDirectory>${project.basedir}</contextDirectory>
+ <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository>
+ <buildArgs>
+ <PROJECT_BUILD_DIR_NAME>target</PROJECT_BUILD_DIR_NAME>
+ <FINAL_JAR>${project.build.finalName}.jar</FINAL_JAR>
+ </buildArgs>
</configuration>
<executions>
<execution>
- <id>install node and npm</id>
+ <id>build-image</id>
+ <phase>package</phase>
<goals>
- <goal>install-node-and-npm</goal>
+ <goal>build</goal>
</goals>
</execution>
<execution>
- <id>npm install</id>
+ <id>tag-and-push-image-latest</id>
+ <phase>package</phase>
<goals>
- <goal>npm</goal>
+ <goal>tag</goal>
+ <goal>push</goal>
</goals>
+ <configuration>
+ <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository>
+ <tag>latest</tag>
+ <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+ </configuration>
</execution>
<execution>
- <id>npm run build</id>
+ <id>tag-and-push-image-with-version</id>
+ <phase>package</phase>
<goals>
- <goal>npm</goal>
+ <goal>tag</goal>
+ <goal>push</goal>
</goals>
<configuration>
- <arguments>run build</arguments>
+ <repository>${onap.nexus.dockerregistry.daily}/${docker.image.name}</repository>
+ <tag>${project.version}</tag>
+ <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
</configuration>
</execution>
- </executions>
+ </executions>
</plugin>
</plugins>
</build>