aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-ui/build_catalog_ui.sh
blob: 36f798513ac9acb5834e88a1a14d331565cd4d98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh



### Set the node environment.
NODE_VERSION="v6.10.0"



### Set the NVM root dir
NVM_DIR=/home/${USER}/.nvm



echo "Set the node environment."
. "${NVM_DIR}/nvm.sh"
echo "OK."
echo ""



### Add newer c++ compiler.
if [ -f /opt/rh/devtoolset-4/enable ]; then
  . /opt/rh/devtoolset-4/enable
fi



### Set the node version manager version.
echo "Set the node version manager version."
nvm use ${NODE_VERSION}
echo "OK."
echo ""



### Run the Node package manager (NPM).
echo "Run the Node package manager (NPM)."
npm install
echo "OK."
echo ""



### Build the application.
echo "Build the application."
npm run build:prod
echo "OK."
echo ""
font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
<?xml version="1.0" encoding="UTF-8"?>
<!--
============LICENSE_START=======================================================
Copyright (c) 2020 AT&T Intellectual Property. All rights reserved.
================================================================================
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
============LICENSE_END=========================================================
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.onap.oparent</groupId>
    <artifactId>oparent</artifactId>
    <version>2.0.0</version>
  </parent>
  <groupId>org.onap.dcaegen2.platform.mod</groupId>
  <artifactId>genprocessor</artifactId>
  <version>1.0.2-SNAPSHOT</version>
  <name>dcaegen2-platform-mod-genprocessor</name>
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <maven.deploy.skip>true</maven.deploy.skip>
    <java.version>1.8</java.version>
    <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
    <docker.pull.registry>nexus3.onap.org:10001</docker.pull.registry>
    <docker.push.registry>${env.NEXUS3_PUSH_REGISTRY}</docker.push.registry>
    <start-class>org.onap.dcae.genprocessor.App</start-class>
    <!--NOTE: Nifi jars used here are version 1.9.2 but dcae mod is on 1.9.3 because 1.9.3 is not in Maven Central -->
    <nifi.version>1.9.2</nifi.version>
    <docker.fabric.version>0.32.0</docker.fabric.version>
    <sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco-ut/jacoco.xml
    </sonar.coverage.jacoco.xmlReportPaths>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.apache.nifi</groupId>
      <artifactId>nifi-api</artifactId>
      <version>${nifi.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.nifi</groupId>
      <artifactId>nifi-record-serialization-service-api</artifactId>
      <version>${nifi.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.nifi</groupId>
      <artifactId>nifi-record</artifactId>
      <version>${nifi.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.nifi</groupId>
      <artifactId>nifi-processor-utils</artifactId>
      <version>${nifi.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.nifi</groupId>
      <artifactId>nifi-utils</artifactId>
      <version>${nifi.version}</version>
    </dependency>
    <dependency>
      <groupId>org.javassist</groupId>
      <artifactId>javassist</artifactId>
      <version>3.25.0-GA</version>
    </dependency>
    <dependency>
      <groupId>ch.qos.logback</groupId>
      <artifactId>logback-classic</artifactId>
      <version>1.2.3</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-core</artifactId>
      <version>2.11.0</version>
    </dependency>
    <dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.11.0</version>
    </dependency>
    <dependency>
      <groupId>org.apache.commons</groupId>
      <artifactId>commons-text</artifactId>
      <version>1.7</version>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>com.github.stefanbirkner</groupId>
      <artifactId>system-rules</artifactId>
      <version>1.19.0</version>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>io.fabric8</groupId>
        <artifactId>docker-maven-plugin</artifactId>
        <version>${docker.fabric.version}</version>
        <configuration>
          <verbose>true</verbose>
          <pullRegistry>${docker.pull.registry}</pullRegistry>
          <pushRegistry>${docker.push.registry}</pushRegistry>
          <images>
            <image>
              <name>onap/${project.groupId}.${project.artifactId}-http</name>
              <registry>${onap.nexus.dockerregistry.daily}</registry>
              <build>
                <from>nginx:latest</from>
                <tags>
                  <tag>latest</tag>
                  <tag>${project.version}</tag>
                  <tag>${project.version}-${maven.build.timestamp}Z</tag>
                </tags>
                <assembly>
                  <targetDir>/</targetDir>
                  <inline>
                    <files>
                      <file>
                        <source>./nginx.conf</source>
                        <outputDirectory>/etc/nginx/conf.d</outputDirectory>
                        <destName>default.conf</destName>
                      </file>
                    </files>
                  </inline>
                </assembly>
		<runCmds>
		  <runCmd>sed -i /etc/nginx/nginx.conf -e '/^user /d' &amp;&amp; touch /var/run/nginx.pid &amp;&amp; mkdir -p /www/data &amp;&amp; chown -R nginx:nginx /www /etc/nginx /var/cache/nginx /var/log/nginx /var/run/nginx.pid</runCmd>
		</runCmds>
		<user>nginx</user>
                <entryPoint>
                  <exec>
                    <arg>nginx</arg>
                    <arg>-g</arg>
                    <arg>daemon off;</arg>
                  </exec>
                </entryPoint>
              </build>
            </image>
            <image>
              <name>onap/${project.groupId}.${project.artifactId}-job</name>
              <registry>${onap.nexus.dockerregistry.daily}</registry>
              <build>
                <from>openjdk:8</from>
                <tags>
                  <tag>latest</tag>
                  <tag>${project.version}</tag>
                  <tag>${project.version}-${maven.build.timestamp}Z</tag>
                </tags>
                <assembly>
                  <descriptorRef>artifact-with-dependencies</descriptorRef>
                </assembly>
		<runCmds>
		  <runCmd>groupadd -g 1000 dcaemod &amp;&amp; useradd --shell /bin/bash -u 1000 -g 1000 -m dcaemod</runCmd>
		</runCmds>
                <workdir>/maven</workdir>
                <env>
                  <GENPROC_WORKING_DIR>/work</GENPROC_WORKING_DIR>
                  <GENPROC_ONBOARDING_API_HOST>http://onboarding-api:8080/onboarding</GENPROC_ONBOARDING_API_HOST>
                  <GENPROC_SLEEP_SEC>10</GENPROC_SLEEP_SEC>
                </env>
		<user>dcaemod</user>
                <entryPoint>
                  <exec>
                    <arg>java</arg>
                    <arg>-cp</arg>
                    <arg>/maven/*</arg>
                    <arg>${start-class}</arg>
                  </exec>
                </entryPoint>
              </build>
            </image>
          </images>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>build</goal>
              <goal>push</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>