You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by GitBox <gi...@apache.org> on 2022/07/18 13:57:27 UTC

[GitHub] [incubator-linkis] AaronLinOops commented on a diff in pull request #2478: support git action and add publish-docker.yaml

AaronLinOops commented on code in PR #2478:
URL: https://github.com/apache/incubator-linkis/pull/2478#discussion_r923404499


##########
.github/workflows/publish-docker.yaml:
##########
@@ -15,66 +15,71 @@
 # limitations under the License.
 #
 
-name: Build
-
-on:
-  push:
+name: publish-docker
+on: 
+  create:
     branches:
-      - dev-1.3.0
+      - release-**
 jobs:
-  build:
+  publish-docker:
     runs-on: ubuntu-latest
- 
+    strategy:
+      matrix:
+        node-version: [14.17.3]
+    timeout-minutes: 90
+    env:
+      TAG: ${{ github.sha }}
+      SKIP_TEST: true
+      HUB: ghcr.io/apache/incubator-linkis
+      LINKIS_VERSION: 1.3.0
     steps:
     - name: Checkout
       uses: actions/checkout@v2
+    - id: commit
+      uses: pr-mpt/actions-commit-hash@v1
     - 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: Build backend by maven
-      run: |
-          ./mvnw -N install
-          ./mvnw clean package
+    - 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 web
-          sed -i \'/VUE_APP_MN_CONFIG_PREFIX/d\' .env
+          sed -i "/VUE_APP_MN_CONFIG_PREFIX/d" .env
           npm install
           npm run build
-    - name: Build Docker Image
+    - name: Build backend by maven
       run: |
-        docker build -f k8s/Dockerfile/linkis-mg-gateway.Dockerfile -t linkis-mg-gateway:1.2 ./assembly-combined-package/target/apache-linkis-1.1.0-incubating-bin/linkis-package
-        docker build -f k8s/Dockerfile/linkis-mg-eureka.Dockerfile -t linkis-mg-gateway:1.2 ./assembly-combined-package/target/apache-linkis-1.1.0-incubating-bin/linkis-package
-        docker build -f k8s/Dockerfile/linkis-ps-publicservice.Dockerfile -t linkis-ps-publicservice:1.2 ./assembly-combined-package/target/apache-linkis-1.1.0-incubating-bin/linkis-package
-        docker build -f k8s/Dockerfile/linkis-ps-cs.Dockerfile -t linkis-ps-cs:1.2 ./assembly-combined-package/target/apache-linkis-1.1.0-incubating-bin/linkis-package
-        docker build -f k8s/Dockerfile/linkis-cg-linkismanager.Dockerfile -t linkis-cg-linkismanager:1.2 ./assembly-combined-package/target/apache-linkis-1.1.0-incubating-bin/linkis-package
-        docker build -f k8s/Dockerfile/linkis-cg-entrance.Dockerfile -t linkis-cg-entrance:1.2 ./assembly-combined-package/target/apache-linkis-1.1.0-incubating-bin/linkis-package
-        docker build -f k8s/Dockerfile/linkis-cg-engineplugin.Dockerfile -t linkis-cg-engineplugin:1.2 ./assembly-combined-package/target/apache-linkis-1.1.0-incubating-bin/linkis-package
-        docker build -f k8s/Dockerfile/linkis-cg-engineconnmanager.Dockerfile -t linkis-cg-engineconnmanager:1.2 ./assembly-combined-package/target/apache-linkis-1.1.0-incubating-bin/linkis-package
-        docker build -f k8s/Dockerfile/linkis-web.Dockerfile -t linkis-web:1.2.0 ./web
+          ./mvnw -N install
+    - name: Build backend by maven
+      run: |
+          ./mvnw install -Pdocker -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -Dlinkis.build.web=true

Review Comment:
   大镜像的时候,有一个参数用来控制是否将 mysql jdbc connector 包一起打到镜像中,默认会打到镜像中,正式发布时是否需要应该将  mysql jdbc connector 去掉? 去掉的方法是添加如下参数:
   
   -Dimage.build.type=release
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org