You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by ca...@apache.org on 2023/02/21 07:51:56 UTC

[rocketmq] branch develop updated: [ISSUE #6140]Use apache/rocketmq-ci docker repo in CI (#6135)

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

caigy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/rocketmq.git


The following commit(s) were added to refs/heads/develop by this push:
     new 68ec1afb2 [ISSUE #6140]Use apache/rocketmq-ci docker repo in CI (#6135)
68ec1afb2 is described below

commit 68ec1afb2ef8eb3b4518c052dbfb87ab5ddaf550
Author: deepsola <wa...@alibaba-inc.com>
AuthorDate: Tue Feb 21 15:51:48 2023 +0800

    [ISSUE #6140]Use apache/rocketmq-ci docker repo in CI (#6135)
    
    * Create pr-ci.yml
    
    * Create pr-e2e-test.yml
    
    * Create push-ci.yml
    
    * Update push-ci.yml
    
    * Update push-ci.yml
    
    * Update pr-ci.yml
    
    * Update README.md
    
    * improve performance
    
    * Update README.md
    
    * Update push-ci.yml
    
    * Create README.md
    
    * modify docker repo
    
    * Update push-ci.yml
    
    * Update pr-e2e-test.yml
    
    * use apache/rocketmq-ci docker repo
    
    * Revert "Create README.md"
    
    This reverts commit be678f1a65545070ce6682263efa6ce15de18861.
    
    ---------
    
    Co-authored-by: yueya <10...@users.noreply.github.com>
    Co-authored-by: 月伢 <yu...@alibaba-inc.com>
---
 .github/workflows/pr-e2e-test.yml | 32 ++++++++++++++++++++++++++------
 .github/workflows/push-ci.yml     | 33 +++++++++++++++++++++++++--------
 2 files changed, 51 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/pr-e2e-test.yml b/.github/workflows/pr-e2e-test.yml
index 7530a2372..25976ca4f 100644
--- a/.github/workflows/pr-e2e-test.yml
+++ b/.github/workflows/pr-e2e-test.yml
@@ -8,6 +8,9 @@ on:
     types:
       - completed
 
+env:
+  DOCKER_REPO: apache/rocketmq-ci
+
 jobs:
   docker:
     runs-on: ubuntu-latest
@@ -50,6 +53,12 @@ jobs:
           repository: apache/rocketmq-docker.git
           ref: master
           path: rocketmq-docker
+      - name: docker-login
+        uses: docker/login-action@v2
+        with:
+          registry: ${{ env.REGISTRY }}
+          username: ${{ secrets.DOCKERHUB_USER }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
       - name: Build and save docker images
         id: build-images
         run: |
@@ -57,7 +66,7 @@ jobs:
           version=${{ github.event.pull_request.number || github.ref_name }}-$(uuidgen)
           mkdir versionlist
           touch versionlist/"${version}-`echo ${{ matrix.base-image }} | sed -e "s/:/-/g"`"
-          sh ./build-image-local.sh ${version} ${{ matrix.base-image }} ${{ matrix.java-version }} "cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com/cicd/rocketmq" ${{ secrets.DOCKER_REPO_USERNAME }} ${{ secrets.DOCKER_REPO_PASSWORD }}
+          sh ./build-image-local.sh ${version} ${{ matrix.base-image }} ${{ matrix.java-version }} ${DOCKER_REPO}
       - uses: actions/upload-artifact@v3
         name: Upload distribution tar
         with:
@@ -94,18 +103,29 @@ jobs:
       matrix:
         version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
     steps:
-      - uses: alibaba/cloud-native-test-ci-tool@v0.0.1
+      - uses: alibaba/cloud-native-test-ci-tool@v1
         name: Deploy rocketmq
         with:
           action: "deploy"
           ask-config: "${{ secrets.ASK_CONFIG }}"
           test-version: "${{ matrix.version }}"
-          docker-repo-username: "${{ secrets.DOCKER_REPO_USERNAME }}"
-          docker-repo-password: "${{ secrets.DOCKER_REPO_PASSWORD }}"
           chart-git: "https://ghproxy.com/https://github.com/apache/rocketmq-docker.git"
           chart-branch: "master"
           chart-path: "./rocketmq-k8s-helm"
           job-id: ${{ strategy.job-index }}
+          helm-values: |
+            nameserver:
+              image:
+                repository: ${{env.DOCKER_REPO}}
+                tag: ${{ matrix.version }}
+            broker:
+              image:
+                repository: ${{env.DOCKER_REPO}}
+                tag: ${{ matrix.version }}
+            proxy:
+              image:
+                repository: ${{env.DOCKER_REPO}}
+                tag: ${{ matrix.version }}
 
   e2e-test:
     if: ${{ success() }}
@@ -117,7 +137,7 @@ jobs:
       matrix:
         version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
     steps:
-      - uses: alibaba/cloud-native-test-ci-tool@v0.0.1
+      - uses: alibaba/cloud-native-test-ci-tool@v1
         name: e2e test
         with:
           action: "test"
@@ -154,7 +174,7 @@ jobs:
       matrix:
         version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
     steps:
-      - uses: alibaba/cloud-native-test-ci-tool@v0.0.1
+      - uses: alibaba/cloud-native-test-ci-tool@v1
         name: clean
         with:
           action: "clean"
diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml
index fdf5852d1..fb5d01c55 100644
--- a/.github/workflows/push-ci.yml
+++ b/.github/workflows/push-ci.yml
@@ -11,7 +11,8 @@ concurrency:
 
 env:
   MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120
-  
+  DOCKER_REPO: apache/rocketmq-ci
+
 jobs:
   dist-tar:
     name: Build dist tar
@@ -56,6 +57,12 @@ jobs:
         with:
           name: rocketmq
           path: rocketmq
+      - name: docker-login
+        uses: docker/login-action@v2
+        with:
+          registry: ${{ env.REGISTRY }}
+          username: ${{ secrets.DOCKERHUB_USER }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
       - name: Build and save docker images
         id: build-images
         run: |
@@ -63,7 +70,7 @@ jobs:
           version=${{ github.event.pull_request.number || github.ref_name }}-$(uuidgen)
           mkdir versionlist
           touch versionlist/"${version}-`echo ${{ matrix.base-image }} | sed -e "s/:/-/g"`"
-          sh ./build-image-local.sh ${version} ${{ matrix.base-image }} ${{ matrix.java-version }} "cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com/cicd/rocketmq" ${{ secrets.DOCKER_REPO_USERNAME }} ${{ secrets.DOCKER_REPO_PASSWORD }}
+          sh ./build-image-local.sh ${version} ${{ matrix.base-image }} ${{ matrix.java-version }} ${DOCKER_REPO}
       - uses: actions/upload-artifact@v3
         name: Upload distribution tar
         with:
@@ -101,19 +108,29 @@ jobs:
       matrix:
         version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
     steps:
-      - uses: alibaba/cloud-native-test-ci-tool@v0.0.1
+      - uses: alibaba/cloud-native-test-ci-tool@v1
         name: Deploy rocketmq
         with:
           action: "deploy"
           ask-config: "${{ secrets.ASK_CONFIG }}"
           test-version: "${{ matrix.version }}"
-          docker-repo-username: "${{ secrets.DOCKER_REPO_USERNAME }}"
-          docker-repo-password: "${{ secrets.DOCKER_REPO_PASSWORD }}"
           chart-git: "https://ghproxy.com/https://github.com/apache/rocketmq-docker.git"
           chart-branch: "master"
           chart-path: "./rocketmq-k8s-helm"
           job-id: ${{ strategy.job-index }}
-
+          helm-values: |
+            nameserver:
+              image:
+                repository: ${{env.DOCKER_REPO}}
+                tag: ${{ matrix.version }}
+            broker:
+              image:
+                repository: ${{env.DOCKER_REPO}}
+                tag: ${{ matrix.version }}
+            proxy:
+              image:
+                repository: ${{env.DOCKER_REPO}}
+                tag: ${{ matrix.version }}
   e2e-test:
     if: ${{ success() }}
     name: E2E Test
@@ -124,7 +141,7 @@ jobs:
       matrix:
         version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
     steps:
-      - uses: alibaba/cloud-native-test-ci-tool@v0.0.1
+      - uses: alibaba/cloud-native-test-ci-tool@v1
         name: e2e test
         with:
           action: "test"
@@ -160,7 +177,7 @@ jobs:
       matrix:
         version: ${{ fromJSON(needs.list-version.outputs.version-json) }}
     steps:
-      - uses: alibaba/cloud-native-test-ci-tool@v0.0.1
+      - uses: alibaba/cloud-native-test-ci-tool@v1
         name: clean
         with:
           action: "clean"