updating docker repository to onap nexus 35/113335/5
authorNicholas Soteropoulos <ns299g@us.att.com>
Tue, 29 Sep 2020 17:44:27 +0000 (13:44 -0400)
committerNicholas Soteropoulos <ns299g@us.att.com>
Thu, 1 Oct 2020 16:04:57 +0000 (12:04 -0400)
Change-Id: I542aa09dde0dbcd54b69e2bfbce593bfcfb849c6
Issue-ID: DCAEGEN2-2317
Signed-off-by: Nicholas Soteropoulos <ns299g@us.att.com>
mod2/ui/Dockerfile
mod2/ui/pom.xml

index 67744d4..904c656 100644 (file)
@@ -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
 
index 50122de..b2e887e 100644 (file)
     <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>