summaryrefslogtreecommitdiffstats
path: root/mod2/ui
diff options
context:
space:
mode:
authorVijay Venkatesh Kumar <vv770d@att.com>2020-10-01 20:45:49 +0000
committerGerrit Code Review <gerrit@onap.org>2020-10-01 20:45:49 +0000
commite4668da0683be7194f45cd8d259eeb75ebdb98a8 (patch)
treec9dda1475752338fd29ae80875543b8bc85eebf6 /mod2/ui
parente669b34a5ca86cd6c41dd7e0430893c9b03f85bb (diff)
parentcd2b9a392a6a77dd40703a861999144ee0b3413c (diff)
Merge "updating docker repository to onap nexus"
Diffstat (limited to 'mod2/ui')
-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>