This is an automated email from the ASF dual-hosted git repository.

jin pushed a commit to branch docker-1.0.0
in repository 
https://gitbox.apache.org/repos/asf/incubator-hugegraph-toolchain.git


The following commit(s) were added to refs/heads/docker-1.0.0 by this push:
     new 3f0a3233 feat: support docker for loader-1.0.0 (#532)
3f0a3233 is described below

commit 3f0a3233b309a103a2b1996d93dab2d0d3e8e93f
Author: Dandelion <[email protected]>
AuthorDate: Tue Nov 14 15:32:03 2023 +0800

    feat: support docker for loader-1.0.0 (#532)
    
    * feat: support docker for loader-1.0.0
    
    * update workflow, using node.js v16
---
 .github/workflows/codeql-analysis.yml | 16 +++++++++---
 .github/workflows/hubble-ci.yml       |  5 +++-
 .github/workflows/license-checker.yml |  9 +++++++
 hugegraph-loader/Dockerfile           | 49 +++++++++++++++++++++++++++++++++++
 4 files changed, 75 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/codeql-analysis.yml 
b/.github/workflows/codeql-analysis.yml
index 2f4f5ae2..d709ec89 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -12,8 +12,6 @@
 name: "CodeQL"
 
 on:
-  push:
-    branches: [ master, release-* ]
   pull_request:
     # The branches below must be a subset of the branches above
     # branches: [ master ] # enable in all PR
@@ -44,7 +42,11 @@ jobs:
       with:
         distribution: 'zulu'
         java-version: '8'
-
+        
+    - name: Use Node.js 16
+      uses: actions/setup-node@v3
+      with:
+        node-version: '16'
     # Initializes the CodeQL tools for scanning.
     - name: Initialize CodeQL
       uses: github/codeql-action/init@v2
@@ -81,3 +83,11 @@ jobs:
 
     - name: Perform CodeQL Analysis
       uses: github/codeql-action/analyze@v2
+
+  dependency-review:
+    runs-on: ubuntu-latest
+    steps:
+      - name: 'Checkout Repository'
+        uses: actions/checkout@v3
+      - name: 'Dependency Review'
+        uses: actions/dependency-review-action@v2
diff --git a/.github/workflows/hubble-ci.yml b/.github/workflows/hubble-ci.yml
index 2c0edc8c..007b45f6 100644
--- a/.github/workflows/hubble-ci.yml
+++ b/.github/workflows/hubble-ci.yml
@@ -36,7 +36,10 @@ jobs:
         with:
           java-version: '11'
           distribution: 'adopt'
-
+      - name: Use Node.js 16
+        uses: actions/setup-node@v3
+        with:
+          node-version: '16'
       # we also should cache python & yarn & downloads to avoid useless work
       - name: Cache Maven packages
         uses: actions/cache@v3
diff --git a/.github/workflows/license-checker.yml 
b/.github/workflows/license-checker.yml
index 334519ea..540de04e 100644
--- a/.github/workflows/license-checker.yml
+++ b/.github/workflows/license-checker.yml
@@ -45,6 +45,11 @@ jobs:
           java-version: '11'
           distribution: 'adopt'
 
+      - name: Use Node.js 16
+        uses: actions/setup-node@v3
+        with:
+          node-version: '16'
+        
       - name: License check(RAT)
         run: |
           mvn apache-rat:check -ntp
@@ -63,6 +68,10 @@ jobs:
         with:
           java-version: '11'
           distribution: 'adopt'
+      - name: Use Node.js 16
+        uses: actions/setup-node@v3
+        with:
+          node-version: '16'
       - name: mvn install
         run: |
           mvn install -DskipTests=true -ntp
diff --git a/hugegraph-loader/Dockerfile b/hugegraph-loader/Dockerfile
new file mode 100644
index 00000000..c13650d9
--- /dev/null
+++ b/hugegraph-loader/Dockerfile
@@ -0,0 +1,49 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You 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.
+#
+
+FROM maven:3.9.0-eclipse-temurin-11 AS build
+
+COPY . /pkg
+WORKDIR /pkg
+
+RUN set -x \
+    && mvn install -pl hugegraph-client,hugegraph-loader -am 
-Dmaven.javadoc.skip=true -DskipTests -ntp
+
+RUN set -x \
+    && cd /pkg/hugegraph-loader/ \
+    && echo "$(ls)" \
+    && mvn clean package -DskipTests
+
+FROM openjdk:11-slim
+
+COPY --from=build /pkg/hugegraph-loader/apache-hugegraph-loader-incubating-*/ 
/loader
+WORKDIR /loader/
+
+RUN set -x \
+    && apt-get -q update \
+    && apt-get -q install -y --no-install-recommends --no-install-suggests \
+       dumb-init \
+       procps \
+       curl \
+       lsof \
+    && apt-get clean \
+    && rm -rf /var/lib/apt/lists/*
+
+VOLUME /loader
+
+ENTRYPOINT ["/usr/bin/dumb-init", "--"]
+CMD ["tail","-f","/dev/null"]

Reply via email to