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

casion pushed a commit to branch dev-1.4.0-integration-test2
in repository https://gitbox.apache.org/repos/asf/linkis.git


The following commit(s) were added to refs/heads/dev-1.4.0-integration-test2 by 
this push:
     new 92db3c65f add docker push
92db3c65f is described below

commit 92db3c65fdfb4d297d7f04831a80ad026e8d3eb7
Author: casionone <[email protected]>
AuthorDate: Tue May 30 21:52:27 2023 +0800

    add docker push
---
 .github/workflows/docker-publish.yml   | 92 ++++++++++++++++++++++++++++++++++
 .github/workflows/integration-test.yml |  7 ++-
 2 files changed, 95 insertions(+), 4 deletions(-)

diff --git a/.github/workflows/docker-publish.yml 
b/.github/workflows/docker-publish.yml
new file mode 100644
index 000000000..600439f12
--- /dev/null
+++ b/.github/workflows/docker-publish.yml
@@ -0,0 +1,92 @@
+#
+# 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.
+#
+
+name: Publish Docker
+on:
+  push:
+    branches:
+      - dev-1.4.0-integration-test2
+env:
+  KIND_CONFIG_PATH: './linkis-dist/helm/scripts/resources/kind-cluster.yaml'
+  KIND_CLUSTER_NAME: 'test-helm'
+  MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false 
-Dmaven.wagon.http.retryHandler.class=standard 
-Dmaven.wagon.http.retryHandler.count=3 
-Dmaven.wagon.httpconnectionManager.ttlSeconds=120
+
+jobs:
+  publish-docker:
+    runs-on: ubuntu-latest
+    strategy:
+      matrix:
+        node-version: [16.0.0]
+    timeout-minutes: 90
+    env:
+      TAG: ${{ github.sha }}
+      SKIP_TEST: true
+      HUB: ghcr.io/apache/linkis
+      LINKIS_VERSION: 1.4.0-SNAPSHOT
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+      - name: Set up JDK 8
+        uses: actions/setup-java@v2
+        with:
+          distribution: 'adopt'
+          java-version: 8
+      - name: Cache local Maven repository
+        uses: actions/cache@v2
+        with:
+          path: ~/.m2/repository
+          key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
+          restore-keys: |
+            ${{ runner.os }}-maven-
+      - name: Use Node.js ${{ matrix.node-version }}
+        uses: actions/setup-node@v2
+        with:
+          node-version: ${{ matrix.node-version }}
+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v1
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v1
+      - name: Build frontend by node.js
+        run: |
+          cd linkis-web
+          sed -i "/VUE_APP_MN_CONFIG_PREFIX/d" .env
+          npm install
+          npm run build
+
+      - name: Build backend by maven
+        run: |
+          ./mvnw install -Pdocker -Dmysql.connector.scope=provided 
-Dmaven.javadoc.skip=true -Dmaven.test.skip=true -Dlinkis.build.web=true 
-Dlinkis.build.ldh=true
+
+      - name: Log in to the Container registry
+        uses: docker/[email protected]
+        with:
+          registry: ${{ env.HUB }}
+          username: ${{ github.actor }}
+          password: ${{ secrets.GITHUB_TOKEN }}
+      - name: Push Docker Image
+        env:
+          DOCKER_VERSION: ${{ github.ref_name }}-${{ github.sha }}
+        run: |
+          docker images
+          docker tag linkis:${{ env.LINKIS_VERSION }} ${{ env.HUB }}/linkis:dev
+          docker push ${{ env.HUB }}/linkis:dev
+
+          docker tag linkis-web:${{ env.LINKIS_VERSION }} ${{ env.HUB 
}}/linkis-web:dev
+          docker push ${{ env.HUB }}/linkis-web:dev
+
+          docker tag linkis-ldh:${{ env.LINKIS_VERSION }} ${{ env.HUB 
}}/linkis-ldh:dev
+          docker push ${{ env.HUB }}/linkis-ldh:dev
\ No newline at end of file
diff --git a/.github/workflows/integration-test.yml 
b/.github/workflows/integration-test.yml
index 4b1600909..051227ef6 100644
--- a/.github/workflows/integration-test.yml
+++ b/.github/workflows/integration-test.yml
@@ -134,7 +134,7 @@ jobs:
               && bash ./linkis-dist/helm/scripts/install-charts-with-ldh.sh 
linkis linkis-demo true
           n=0
           sleep 60
-          while (($n<10))
+          while (($n<15))
           do
             kubectl get pods -A
             n=$((n+1))
@@ -148,9 +148,8 @@ jobs:
           bash ./linkis-dist/helm/scripts/remote-proxy.sh start
           # 查看proxy 端口映射
           bash ./linkis-dist/helm/scripts/remote-proxy.sh list
-
           # 执行shell测试
-          bash ./linkis-dist/target/apache-linkis-*-bin/package/bin/linkis-cli 
--gatewayUrl http://127.0.0.1:19001 -engineType shell-1 -codeType shell -code 
"echo "hello" "
+          bash ./linkis-dist/target/apache-linkis-${{ env.LINKIS_VERSION 
}}-bin/linkis-package/bin/linkis-cli --gatewayUrl http://127.0.0.1:19001 
-engineType shell-1 -codeType shell -code "echo "hello" "
           #执行python测试
-          bash ./linkis-dist/target/apache-linkis-*-bin/package/bin/linkis-cli 
--gatewayUrl http://127.0.0.1:19001 -engineType python-python2 -codeType python 
-code "print(\"hello\")"
+          bash ./linkis-dist/target/apache-linkis-${{ env.LINKIS_VERSION 
}}-bin/linkis-package/bin/linkis-cli --gatewayUrl http://127.0.0.1:19001 
-engineType python-python2 -codeType python -code "print(\"hello\")"
         shell: bash
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to