fix docker build issue 75/112775/4
authorKai <lukai@chinamobile.com>
Thu, 17 Sep 2020 03:17:13 +0000 (11:17 +0800)
committerLUKAI <lukai@chinamobile.com>
Fri, 18 Sep 2020 01:36:06 +0000 (01:36 +0000)
Issue-ID: DCAEGEN2-2258
Signed-off-by: Kai Lu <lukai@chinamobile.com>
Change-Id: Ifb2e7fff81b2f236178b513f2c4f155f5bcdf33a

components/datalake-handler/des/Dockerfile
components/datalake-handler/des/pom.xml

index 622a45c..18c4db8 100644 (file)
@@ -33,7 +33,7 @@ COPY target/${JAR_FILE} /home/datalake/
 COPY src/assembly/run.sh /home/datalake/
 
 WORKDIR /home/datalake/db_init
-ADD src/assembly/init_db/scripts/db_init .
+ADD src/assembly/init_db/scripts .
 USER root
 RUN chmod 0755 ./*
 WORKDIR /home/datalake
index e62fcb6..012c346 100644 (file)
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- ============LICENSE_START======================================================= 
-       Copyright (C) 2020 China Mobile. 
-       ================================================================================ 
-       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. SPDX-License-Identifier: 
-       Apache-2.0 
-       ============LICENSE_END========================================================= -->
+<!--
+  ~ ============LICENSE_START=======================================================
+  ~ Copyright (c) 2020 China Mobile. 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.dcaegen2.services.components</groupId>
-               <artifactId>datalake-handler</artifactId>
-               <version>1.1.0-SNAPSHOT</version>
-       </parent>
-
-       <artifactId>des</artifactId>
-       <packaging>jar</packaging>
-       <name>DataLake Extraction Service</name>
-
-       <properties>
-               <swagger.version>2.9.2</swagger.version>
-               <dockerfile-maven.version>1.4.5</dockerfile-maven.version>
-               <docker.image.path>onap/org.onap.dcaegen2.services.datalake.exposure.service</docker.image.path>
-               <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
-       </properties>
-
-       <dependencies>
-
-               <dependency>
-                       <groupId>org.jdom</groupId>
-                       <artifactId>jdom2</artifactId>
-                       <version>2.0.6</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>com.facebook.presto</groupId>
-                       <artifactId>presto-jdbc</artifactId>
-                       <version>0.240</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.apache.hadoop</groupId>
-                       <artifactId>hadoop-client</artifactId>
-                       <version>${hadoop.version}</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.mariadb.jdbc</groupId>
-                       <artifactId>mariadb-java-client</artifactId>
-                       <version>2.4.1</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.json</groupId>
-                       <artifactId>json</artifactId>
-                       <version>20190722</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.apache.httpcomponents</groupId>
-                       <artifactId>httpclient</artifactId>
-                       <version>4.5.10</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.apache.kafka</groupId>
-                       <artifactId>kafka-clients</artifactId>
-                       <version>2.3.1</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.springframework.boot</groupId>
-                       <artifactId>spring-boot-starter-web</artifactId>
-                       <version>${springboot.version}</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.springframework.boot</groupId>
-                       <artifactId>spring-boot-starter-actuator</artifactId>
-                       <version>${springboot.version}</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.springframework.boot</groupId>
-                       <artifactId>spring-boot-starter-data-jpa</artifactId>
-                       <version>${springboot.version}</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.springframework.boot</groupId>
-                       <artifactId>spring-boot-starter-data-couchbase</artifactId>
-                       <version>${springboot.version}</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.springframework.boot</groupId>
-                       <artifactId>spring-boot-starter-test</artifactId>
-                       <version>${springboot.version}</version>
-                       <scope>test</scope>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.springframework.boot</groupId>
-                       <artifactId>spring-boot-configuration-processor</artifactId>
-                       <version>${springboot.version}</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.elasticsearch.client</groupId>
-                       <artifactId>elasticsearch-rest-high-level-client</artifactId>
-                       <version>${elasticsearchjava.version}</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>commons-io</groupId>
-                       <artifactId>commons-io</artifactId>
-                       <version>2.6</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>com.fasterxml.jackson.dataformat</groupId>
-                       <artifactId>jackson-dataformat-yaml</artifactId>
-                       <version>${jackson.version}</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>com.fasterxml.jackson.dataformat</groupId>
-                       <artifactId>jackson-dataformat-xml</artifactId>
-                       <version>${jackson.version}</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>com.fasterxml.jackson.core</groupId>
-                       <artifactId>jackson-databind</artifactId>
-                       <version>${jackson.version}</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>com.google.code.gson</groupId>
-                       <artifactId>gson</artifactId>
-                       <version>2.8.2</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.projectlombok</groupId>
-                       <artifactId>lombok</artifactId>
-                       <version>1.18.10</version>
-                       <scope>provided</scope>
-               </dependency>
-
-               <dependency>
-                       <groupId>io.druid</groupId>
-                       <artifactId>tranquility-core_2.11</artifactId>
-                       <version>0.8.3</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.apache.velocity</groupId>
-                       <artifactId>velocity-engine-core</artifactId>
-                       <version>2.1</version>
-               </dependency>
-
-
-               <dependency>
-                       <groupId>org.hibernate</groupId>
-                       <artifactId>hibernate-core</artifactId>
-                       <version>5.3.7.Final</version>
-               </dependency>
-
-               <!-- jsr303 validation -->
-               <dependency>
-                       <groupId>javax.validation</groupId>
-                       <artifactId>validation-api</artifactId>
-                       <version>2.0.1.Final</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.hibernate</groupId>
-                       <artifactId>hibernate-validator</artifactId>
-                       <version>6.1.0.Final</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>io.springfox</groupId>
-                       <artifactId>springfox-swagger2</artifactId>
-                       <version>${swagger.version}</version>
-                       <scope>compile</scope>
-               </dependency>
-
-               <dependency>
-                       <groupId>io.springfox</groupId>
-                       <artifactId>springfox-swagger-ui</artifactId>
-                       <version>${swagger.version}</version>
-                       <scope>compile</scope>
-               </dependency>
-
-               <dependency>
-                       <groupId>org.mongodb</groupId>
-                       <artifactId>mongo-java-driver</artifactId>
-                       <version>${mongojava.version}</version>
-               </dependency>
-
-               <dependency>
-                       <groupId>com.couchbase.mock</groupId>
-                       <artifactId>CouchbaseMock</artifactId>
-                       <version>1.5.22</version>
-                       <scope>test</scope>
-               </dependency>
-
-       </dependencies>
-
-
-       <build>
-               <plugins>
-                       <plugin>
-                               <groupId>org.springframework.boot</groupId>
-                               <artifactId>spring-boot-maven-plugin</artifactId>
-                               <configuration>
-                                       <classifier>execute</classifier>
-                                       <executions>
-                                               <execution>
-                                                       <goals>
-                                                               <goal>repackage</goal>
-                                                       </goals>
-                                               </execution>
-                                       </executions>
-                               </configuration>
-                       </plugin>
-                       <plugin>
-                               <groupId>com.spotify</groupId>
-                               <artifactId>dockerfile-maven-plugin</artifactId>
-                               <version>${dockerfile-maven.version}</version>
-                               <configuration>
-                                       <!-- <username>docker</username> <password>docker</password> -->
-                                       <!-- repository>repo.treescale.com/moguobiao/datalake-feeder-maven</repository -->
-                                       <!-- repository>moguobiao/datalake-feeder-maven-spotify</repository -->
-                                       <repository>${onap.nexus.dockerregistry.daily}/${docker.image.path}</repository>
-                                       <!-- <repository>mizunoami123/dl-feeder</repository> -->
-                                       <tag>${project.version}</tag>
-                                       <dockerfile>Dockerfile</dockerfile>
-                                       <!-- useMavenSettingsForAuth>true</useMavenSettingsForAuth -->
-                                       <buildArgs>
-                                               <JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
-                                       </buildArgs>
-                               </configuration>
-       <!--            <executions>
-                                       <execution>
-                                               <id>build-sl-des-image</id>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       <goal>build</goal>
-                                               </goals>
-                                       </execution>
-                                       <execution>
-                                               <id>tag-and-push-image-latest</id>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       <goal>tag</goal>
-                                                       <goal>push</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <repository>${onap.nexus.dockerregistry.daily}/${docker.image.path}</repository>
-                                                       <tag>latest</tag>
-                                                       <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
-                                               </configuration>
-                                       </execution>
-                                       <execution>
-                                               <id>tag-and-push-image-with-version</id>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       <goal>tag</goal>
-                                                       <goal>push</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <repository>${onap.nexus.dockerregistry.daily}/${docker.image.path}</repository>
-                                                       <tag>${project.version}</tag>
-                                                       <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
-                                               </configuration>
-                                       </execution>
-                                       <execution>
-                                               <id>tag-and-push-image-with-version-and-date</id>
-                                               <phase>package</phase>
-                                               <goals>
-                                                       <goal>tag</goal>
-                                                       <goal>push</goal>
-                                               </goals>
-                                               <configuration>
-                                                       <repository>${onap.nexus.dockerregistry.daily}/${docker.image.path}</repository>
-                                                       <tag>${project.version}-${maven.build.timestamp}Z</tag>
-                                                       <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
-                                               </configuration>
-                                       </execution>
-                               </executions> -->   
-                               <dependencies>
-                                       <!-- To make this work on JDK 9+ -->
-                                       <dependency>
-                                               <groupId>javax.activation</groupId>
-                                               <artifactId>javax.activation-api</artifactId>
-                                               <version>1.2.0</version>
-                                       </dependency>
-                               </dependencies>
-                       </plugin>
-               </plugins>
-       </build>
+    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.dcaegen2.services.components</groupId>
+        <artifactId>datalake-handler</artifactId>
+        <version>1.1.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>des</artifactId>
+    <packaging>jar</packaging>
+    <name>DataLake Extraction Service</name>
+
+    <properties>
+        <swagger.version>2.9.2</swagger.version>
+        <dockerfile-maven.version>1.4.10</dockerfile-maven.version>
+        <docker.image.path>onap/org.onap.dcaegen2.services.datalake.exposure.service</docker.image.path>
+        <maven.build.timestamp.format>yyyyMMdd'T'HHmmss</maven.build.timestamp.format>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.jdom</groupId>
+            <artifactId>jdom2</artifactId>
+            <version>2.0.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.facebook.presto</groupId>
+            <artifactId>presto-jdbc</artifactId>
+            <version>0.240</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.hadoop</groupId>
+            <artifactId>hadoop-client</artifactId>
+            <version>${hadoop.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mariadb.jdbc</groupId>
+            <artifactId>mariadb-java-client</artifactId>
+            <version>2.4.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+            <version>20190722</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+            <version>4.5.10</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.kafka</groupId>
+            <artifactId>kafka-clients</artifactId>
+            <version>2.3.1</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+            <version>${springboot.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+            <version>${springboot.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-jpa</artifactId>
+            <version>${springboot.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-data-couchbase</artifactId>
+            <version>${springboot.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <version>${springboot.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+            <version>${springboot.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.elasticsearch.client</groupId>
+            <artifactId>elasticsearch-rest-high-level-client</artifactId>
+            <version>${elasticsearchjava.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.6</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.dataformat</groupId>
+            <artifactId>jackson-dataformat-yaml</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.dataformat</groupId>
+            <artifactId>jackson-dataformat-xml</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.fasterxml.jackson.core</groupId>
+            <artifactId>jackson-databind</artifactId>
+            <version>${jackson.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.google.code.gson</groupId>
+            <artifactId>gson</artifactId>
+            <version>2.8.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.10</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>io.druid</groupId>
+            <artifactId>tranquility-core_2.11</artifactId>
+            <version>0.8.3</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.velocity</groupId>
+            <artifactId>velocity-engine-core</artifactId>
+            <version>2.1</version>
+        </dependency>
+
+
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-core</artifactId>
+            <version>5.3.7.Final</version>
+        </dependency>
+
+        <!-- jsr303 validation -->
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+            <version>2.0.1.Final</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.hibernate</groupId>
+            <artifactId>hibernate-validator</artifactId>
+            <version>6.1.0.Final</version>
+        </dependency>
+
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger2</artifactId>
+            <version>${swagger.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>io.springfox</groupId>
+            <artifactId>springfox-swagger-ui</artifactId>
+            <version>${swagger.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mongodb</groupId>
+            <artifactId>mongo-java-driver</artifactId>
+            <version>${mongojava.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>com.couchbase.mock</groupId>
+            <artifactId>CouchbaseMock</artifactId>
+            <version>1.5.22</version>
+            <scope>test</scope>
+        </dependency>
+
+    </dependencies>
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <classifier>execute</classifier>
+                    <executions>
+                        <execution>
+                            <goals>
+                                <goal>repackage</goal>
+                            </goals>
+                        </execution>
+                    </executions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>com.spotify</groupId>
+                <artifactId>dockerfile-maven-plugin</artifactId>
+                <version>${dockerfile-maven.version}</version>
+                <configuration>
+                    <repository>${onap.nexus.dockerregistry.daily}/${docker.image.path}</repository>
+                    <tag>${project.version}</tag>
+                    <dockerfile>Dockerfile</dockerfile>
+                    <buildArgs>
+                        <JAR_FILE>${project.build.finalName}.jar</JAR_FILE>
+                    </buildArgs>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>build-sl-des-image</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>build</goal>
+                        </goals>
+                    </execution>
+                    <execution>
+                        <id>tag-and-push-image-latest</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>tag</goal>
+                            <goal>push</goal>
+                        </goals>
+                        <configuration>
+                            <repository>${onap.nexus.dockerregistry.daily}/${docker.image.path}</repository>
+                            <tag>latest</tag>
+                            <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>tag-and-push-image-with-version</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>tag</goal>
+                            <goal>push</goal>
+                        </goals>
+                        <configuration>
+                            <repository>${onap.nexus.dockerregistry.daily}/${docker.image.path}</repository>
+                            <tag>${project.version}</tag>
+                            <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>tag-and-push-image-with-version-and-date</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>tag</goal>
+                            <goal>push</goal>
+                        </goals>
+                        <configuration>
+                            <repository>${onap.nexus.dockerregistry.daily}/${docker.image.path}</repository>
+                            <tag>${project.version}-${maven.build.timestamp}Z</tag>
+                            <useMavenSettingsForAuth>true</useMavenSettingsForAuth>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <!-- To make this work on JDK 9+ -->
+                    <dependency>
+                        <groupId>javax.activation</groupId>
+                        <artifactId>javax.activation-api</artifactId>
+                        <version>1.2.0</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
 </project>