Merge "netconf-executor: NetconfDeviceCommunicator tests"
authorDan Timoney <dtimoney@att.com>
Tue, 9 Apr 2019 17:09:25 +0000 (17:09 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 9 Apr 2019 17:09:25 +0000 (17:09 +0000)
.gitignore
cds-ui/client/src/app/common/shared/components/search-dialog/search-dialog.html
cds-ui/server/.dockerignore [new file with mode: 0644]
cds-ui/server/Dockerfile [new file with mode: 0644]
cds-ui/server/pom.xml

index 5dbd1d4..e3e0e1f 100644 (file)
@@ -144,3 +144,4 @@ MacOS
 
 # To Remove Kotlin Script Generated Jars
 **/*cba-kts.jar
+/target/
index c6c41bf..9d2141c 100644 (file)
@@ -1,7 +1,7 @@
 <!--
 ============LICENSE_START==========================================
 ===================================================================
-Copyright (C) 2018 IBM Intellectual Property. All rights reserved.
+Copyright (C) 2018-19 IBM Intellectual Property. All rights reserved.
 ===================================================================
 
 Unless otherwise specified, all software contained herein is licensed
diff --git a/cds-ui/server/.dockerignore b/cds-ui/server/.dockerignore
new file mode 100644 (file)
index 0000000..3b3ee00
--- /dev/null
@@ -0,0 +1,4 @@
+node_modules
+npm-debug.log
+/dist
+
diff --git a/cds-ui/server/Dockerfile b/cds-ui/server/Dockerfile
new file mode 100644 (file)
index 0000000..bca90e2
--- /dev/null
@@ -0,0 +1,28 @@
+# Check out https://hub.docker.com/_/node to select a new base image
+FROM node:10-slim
+
+# Set to a non-root built-in user `node`
+USER node
+
+# Create app directory (with user `node`)
+RUN mkdir -p /home/node/app
+
+WORKDIR /home/node/app
+
+# Install app dependencies
+# A wildcard is used to ensure both package.json AND package-lock.json are copied
+# where available (npm@5+)
+COPY --chown=node package*.json ./
+
+RUN npm install
+
+# Bundle app source code
+COPY --chown=node . .
+
+RUN npm run build
+
+# Bind to all network interfaces so that it can be mapped to the host OS
+ENV HOST=0.0.0.0 PORT=3000
+
+EXPOSE ${PORT}
+CMD [ "node", "." ]
index 59b14b8..1c05d55 100644 (file)
@@ -39,6 +39,8 @@ limitations under the License.
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <npm.executable>npm</npm.executable>
         <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
+        <image.name>onap/ccsdk-cds-ui-server</image.name>
+        <docker.push.phase>deploy</docker.push.phase>
     </properties>
 
     <build>
@@ -91,6 +93,73 @@ limitations under the License.
 
                 </executions>
             </plugin>
+            <plugin>
+                <groupId>org.codehaus.groovy.maven</groupId>
+                <artifactId>gmaven-plugin</artifactId>
+                <version>1.0</version>
+                <executions>
+                    <execution>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <source>${basedir}/../../TagVersion.groovy</source>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
         </plugins>
     </build>
+    
+        <profiles>
+        <profile>
+            <id>docker</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>io.fabric8</groupId>
+                        <artifactId>docker-maven-plugin</artifactId>
+                        <version>0.26.1</version>
+                        <inherited>false</inherited>
+                        <configuration>
+                            <images>
+                                <image>
+                                    <name>${image.name}</name>
+                                    <build>
+                                        <cleanup>try</cleanup>
+                                        <dockerFileDir>${basedir}</dockerFileDir>
+                                        <tags>
+                                            <tag>${project.docker.latestminortag.version}</tag>
+                                            <tag>${project.docker.latestfulltag.version}</tag>
+                                            <tag>${project.docker.latesttagtimestamp.version}</tag>
+                                        </tags>
+                                    </build>
+                                </image>
+                            </images>
+                            <verbose>true</verbose>
+                        </configuration>
+                        <executions>
+                            <execution>
+                                <id>generate-images</id>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                </goals>
+                            </execution>
+                            <execution>
+                                <id>push-images</id>
+                                <phase>${docker.push.phase}</phase>
+                                <goals>
+                                    <goal>build</goal>
+                                    <goal>push</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+
+    </profiles>
 </project>