From 13c1489e925f44a67abc296329a52fa8efa1f1a0 Mon Sep 17 00:00:00 2001 From: deepsola Date: Mon, 6 Feb 2023 17:41:39 +0800 Subject: [PATCH 01/16] Create pr-ci.yml --- .github/workflows/pr-ci.yml | 75 +++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .github/workflows/pr-ci.yml diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml new file mode 100644 index 00000000000..57d3f5a7f25 --- /dev/null +++ b/.github/workflows/pr-ci.yml @@ -0,0 +1,75 @@ +name: PR-CI + +on: + pull_request: + +jobs: + unit-test: + if: always() + name: Unit test + runs-on: ${{ matrix.os }}-latest + timeout-minutes: 30 + strategy: + matrix: + os: [ubuntu, macos, windows] + java-version: [8] + include: + - os: ubuntu + java-version: 11 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Cache maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven- + - uses: actions/setup-java@v3 + with: + java-version: ${{ matrix.java-version }} + distribution: adopt + - name: Generate coverage report + run: | + cd broker + mvn -B test --file pom.xml + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + if: always() # always run even if the previous step fails + with: + report_paths: '**/surefire-reports/TEST-*.xml' + annotate_only: true + include_passed: true + detailed_summary: true + dist-tar: + if: ${{ success() }} + name: Build dist tar + needs: [unit-test] + runs-on: ubuntu-latest + timeout-minutes: 120 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - uses: actions/setup-java@v3 + with: + distribution: "temurin" + java-version: "8" + cache: "maven" + - name: Build distribution tar + run: | + mvn -Prelease-all -DskipTests clean install -U + - uses: actions/upload-artifact@v3 + name: Upload distribution tar + with: + name: rocketmq + path: distribution/target/rocketmq*/rocketmq* + - name: Save PR number + run: | + mkdir -p ./pr + echo ${{ github.event.number }} > ./pr/NR + - uses: actions/upload-artifact@v2 + with: + name: pr + path: pr/ From a14c848e644eb42f2727bc6e7c57c507a053532c Mon Sep 17 00:00:00 2001 From: deepsola Date: Mon, 6 Feb 2023 17:42:28 +0800 Subject: [PATCH 02/16] Create pr-e2e-test.yml --- .github/workflows/pr-e2e-test.yml | 156 ++++++++++++++++++++++++++++++ 1 file changed, 156 insertions(+) create mode 100644 .github/workflows/pr-e2e-test.yml diff --git a/.github/workflows/pr-e2e-test.yml b/.github/workflows/pr-e2e-test.yml new file mode 100644 index 00000000000..e2c7e06b728 --- /dev/null +++ b/.github/workflows/pr-e2e-test.yml @@ -0,0 +1,156 @@ +name: E2E test for pull request + +# read-write repo token +# access to secrets +on: + workflow_run: + workflows: ["PR-CI"] + types: + - completed + +jobs: + docker: + runs-on: ubuntu-latest + if: > + github.event.workflow_run.event == 'pull_request' && + github.event.workflow_run.conclusion == 'success' + timeout-minutes: 30 + strategy: + matrix: + base-image: ["ubuntu"] + java-version: ["8"] + steps: + - name: 'Download artifact' + uses: actions/github-script@v3.1.0 + with: + script: | + var artifacts = await github.actions.listWorkflowRunArtifacts({ + owner: context.repo.owner, + repo: context.repo.repo, + run_id: ${{github.event.workflow_run.id }}, + }); + var matchArtifactRmq = artifacts.data.artifacts.filter((artifact) => { + return artifact.name == "rocketmq" + })[0]; + var download = await github.actions.downloadArtifact({ + owner: context.repo.owner, + repo: context.repo.repo, + artifact_id: matchArtifactRmq.id, + archive_format: 'zip', + }); + var fs = require('fs'); + fs.writeFileSync('${{github.workspace}}/rocketmq.zip', Buffer.from(download.data)); + - run: | + unzip rocketmq.zip + mkdir rocketmq + cp -r rocketmq-* rocketmq/ + ls + - uses: actions/checkout@v3 + with: + repository: cryptoya/rocketmq-docker.git + ref: master + path: rocketmq-docker + - name: Build and save docker images + id: build-images + run: | + cd rocketmq-docker/image-build-ci + 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 }} + - uses: actions/upload-artifact@v3 + name: Upload distribution tar + with: + name: versionlist + path: rocketmq-docker/image-build-ci/versionlist/* + + list-version: + if: always() + name: List version + needs: [docker] + runs-on: ubuntu-latest + timeout-minutes: 30 + outputs: + version-json: ${{ steps.show_versions.outputs.version-json }} + steps: + - uses: actions/download-artifact@v3 + name: Download versionlist + with: + name: versionlist + path: versionlist + - name: Show versions + id: show_versions + run: | + a=(`ls versionlist`) + printf '%s\n' "${a[@]}" | jq -R . | jq -s . + echo version-json=`printf '%s\n' "${a[@]}" | jq -R . | jq -s .` >> $GITHUB_OUTPUT + deploy: + if: ${{ success() }} + name: Deploy RocketMQ + needs: [list-version,docker] + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + matrix: + version: ${{ fromJSON(needs.list-version.outputs.version-json) }} + steps: + - uses: alibaba/cloud-native-test-ci-tool@v0.0.1 + 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/cryptoya/rocketmq-docker.git" + chart-branch: "master" + chart-path: "./rocketmq-k8s-helm" + job-id: ${{ strategy.job-index }} + + e2e-test: + if: ${{ success() }} + name: E2E Test + needs: [list-version, deploy] + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + matrix: + version: ${{ fromJSON(needs.list-version.outputs.version-json) }} + steps: + - uses: alibaba/cloud-native-test-ci-tool@v0.0.1 + name: e2e test + with: + action: "test" + ask-config: "${{ secrets.ASK_CONFIG }}" + test-version: "${{ matrix.version }}" + test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e.git" + test-code-branch: "master" + test-code-path: java/e2e + test-cmd: "mvn -B test" + job-id: ${{ strategy.job-index }} + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + if: always() # always run even if the previous step fails + with: + report_paths: '**/test_report/TEST-*.xml' + annotate_only: true + include_passed: true + detailed_summary: true + + clean: + if: always() + name: Clean + needs: [list-version, e2e-test] + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + matrix: + version: ${{ fromJSON(needs.list-version.outputs.version-json) }} + steps: + - uses: alibaba/cloud-native-test-ci-tool@v0.0.1 + name: clean + with: + action: "clean" + ask-config: "${{ secrets.ASK_CONFIG }}" + test-version: "${{ matrix.version }}" + job-id: ${{ strategy.job-index }} From e9abc47985bb7e60bf9f360b5b3c7ad18a2f97be Mon Sep 17 00:00:00 2001 From: deepsola Date: Mon, 6 Feb 2023 17:42:57 +0800 Subject: [PATCH 03/16] Create push-ci.yml --- .github/workflows/push-ci.yml | 202 ++++++++++++++++++++++++++++++++++ 1 file changed, 202 insertions(+) create mode 100644 .github/workflows/push-ci.yml diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml new file mode 100644 index 00000000000..16aabb0e0b9 --- /dev/null +++ b/.github/workflows/push-ci.yml @@ -0,0 +1,202 @@ +name: PUSH-CI + +on: + push: + #schedule: + # - cron: "0 18 * * *" # TimeZone: UTC 0 + +concurrency: + group: rocketmq-${{ github.ref }} + cancel-in-progress: true + +env: + MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 + +jobs: + unit-test: + if: always() + name: Unit test + # needs: [] + runs-on: ${{ matrix.os }}-latest + timeout-minutes: 30 + strategy: + matrix: + os: [ubuntu, macos, windows] + java-version: [8] + include: + - os: ubuntu + java-version: 11 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - name: Cache maven repository + uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-maven- + - uses: actions/setup-java@v3 + with: + java-version: ${{ matrix.java-version }} + distribution: adopt + - name: Build and test + run: | + cd broker + mvn -B test --file pom.xml + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + if: always() # always run even if the previous step fails + with: + report_paths: '**/surefire-reports/TEST-*.xml' + + dist-tar: + if: ${{ success() }} + name: Build dist tar + needs: [unit-test] + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v3 + with: + submodules: true + - uses: actions/setup-java@v3 + with: + distribution: "temurin" + java-version: "8" + cache: "maven" + - name: Build distribution tar + run: | + mvn -Prelease-all -DskipTests clean install -U + - uses: actions/upload-artifact@v3 + name: Upload distribution tar + with: + name: rocketmq + path: distribution/target/rocketmq*/rocketmq* + + docker: + if: ${{ success() }} + name: Docker images + needs: [dist-tar] + runs-on: ubuntu-latest + timeout-minutes: 30 + strategy: + matrix: + base-image: ["ubuntu"] + java-version: ["8"] + steps: + - uses: actions/checkout@v3 + with: + repository: apache/rocketmq-docker.git + ref: master + path: rocketmq-docker + - uses: actions/download-artifact@v3 + name: Download distribution tar + with: + name: rocketmq + path: rocketmq + - name: Build and save docker images + id: build-images + run: | + cd rocketmq-docker/image-build-ci + 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 }} + - uses: actions/upload-artifact@v3 + name: Upload distribution tar + with: + name: versionlist + path: rocketmq-docker/image-build-ci/versionlist/* + + + list-version: + if: always() + name: List version + needs: [docker] + runs-on: ubuntu-latest + timeout-minutes: 30 + outputs: + version-json: ${{ steps.show_versions.outputs.version-json }} + steps: + - uses: actions/download-artifact@v3 + name: Download versionlist + with: + name: versionlist + path: versionlist + - name: Show versions + id: show_versions + run: | + a=(`ls versionlist`) + printf '%s\n' "${a[@]}" | jq -R . | jq -s . + echo version-json=`printf '%s\n' "${a[@]}" | jq -R . | jq -s .` >> $GITHUB_OUTPUT + deploy: + if: ${{ success() }} + name: Deploy RocketMQ + needs: [list-version,docker] + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + matrix: + version: ${{ fromJSON(needs.list-version.outputs.version-json) }} + steps: + - uses: alibaba/cloud-native-test-ci-tool@v0.0.1 + 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/cryptoya/rocketmq-docker.git" + chart-branch: "master" + chart-path: "./rocketmq-k8s-helm" + job-id: ${{ strategy.job-index }} + + e2e-test: + if: ${{ success() }} + name: E2E Test + needs: [list-version, deploy] + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + matrix: + version: ${{ fromJSON(needs.list-version.outputs.version-json) }} + steps: + - uses: alibaba/cloud-native-test-ci-tool@v0.0.1 + name: e2e test + with: + action: "test" + ask-config: "${{ secrets.ASK_CONFIG }}" + test-version: "${{ matrix.version }}" + test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e.git" + test-code-branch: "master" + test-code-path: java/e2e + test-cmd: "mvn -B test" + job-id: ${{ strategy.job-index }} + - name: Publish Test Report + uses: mikepenz/action-junit-report@v3 + if: always() # always run even if the previous step fails + with: + report_paths: '**/test_report/TEST-*.xml' + annotate_only: true + include_passed: true + detailed_summary: true + + clean: + if: always() + name: Clean + needs: [list-version, e2e-test] + runs-on: ubuntu-latest + timeout-minutes: 60 + strategy: + matrix: + version: ${{ fromJSON(needs.list-version.outputs.version-json) }} + steps: + - uses: alibaba/cloud-native-test-ci-tool@v0.0.1 + name: clean + with: + action: "clean" + ask-config: "${{ secrets.ASK_CONFIG }}" + test-version: "${{ matrix.version }}" + job-id: ${{ strategy.job-index }} From eb19a0eda7fd004ba680a84e264014e462aed0fa Mon Sep 17 00:00:00 2001 From: deepsola Date: Mon, 6 Feb 2023 19:03:02 +0800 Subject: [PATCH 04/16] Update push-ci.yml --- .github/workflows/push-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index 16aabb0e0b9..53edb1bd0d7 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -49,6 +49,8 @@ jobs: if: always() # always run even if the previous step fails with: report_paths: '**/surefire-reports/TEST-*.xml' + annotate_only: true + detailed_summary: true dist-tar: if: ${{ success() }} From 44f1eae2647063d2174e3d42dfc5395c01b067e1 Mon Sep 17 00:00:00 2001 From: deepsola Date: Mon, 6 Feb 2023 20:07:15 +0800 Subject: [PATCH 05/16] Update push-ci.yml --- .github/workflows/push-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index 53edb1bd0d7..c23db0c938a 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -50,7 +50,6 @@ jobs: with: report_paths: '**/surefire-reports/TEST-*.xml' annotate_only: true - detailed_summary: true dist-tar: if: ${{ success() }} From b615a033fc078205094604ddd71c55094b4c9a91 Mon Sep 17 00:00:00 2001 From: deepsola Date: Tue, 7 Feb 2023 12:07:50 +0800 Subject: [PATCH 06/16] Update pr-ci.yml --- .github/workflows/pr-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml index 57d3f5a7f25..396399fb72a 100644 --- a/.github/workflows/pr-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -40,8 +40,6 @@ jobs: with: report_paths: '**/surefire-reports/TEST-*.xml' annotate_only: true - include_passed: true - detailed_summary: true dist-tar: if: ${{ success() }} name: Build dist tar From 7fb1e7be73a2bb05f72606c2039b07768d6fe5b7 Mon Sep 17 00:00:00 2001 From: deepsola Date: Fri, 10 Feb 2023 11:07:11 +0800 Subject: [PATCH 07/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2af32482c40..44ae3cce6dc 100644 --- a/README.md +++ b/README.md @@ -244,4 +244,4 @@ services. [percentage-of-issues-still-open-image]: http://isitmaintained.com/badge/open/apache/rocketmq.svg [pencentage-of-issues-still-open-url]: http://isitmaintained.com/project/apache/rocketmq [twitter-follow-image]: https://img.shields.io/twitter/follow/ApacheRocketMQ?style=social -[twitter-follow-url]: https://twitter.com/intent/follow?screen_name=ApacheRocketMQ \ No newline at end of file +[twitter-follow-url]: https://twitter.com/intent/follow?screen_name=ApacheRocketMQ From 259df1177ef2240d8c3740c5f4ca531532a6259c Mon Sep 17 00:00:00 2001 From: "wangtong.wt" Date: Fri, 10 Feb 2023 14:06:58 +0800 Subject: [PATCH 08/16] improve performance --- .github/workflows/pr-ci.yml | 43 ++---------------------- .github/workflows/pr-e2e-test.yml | 11 +++++-- .github/workflows/push-ci.yml | 54 ++++++------------------------- 3 files changed, 22 insertions(+), 86 deletions(-) diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml index 396399fb72a..ef2db755d00 100644 --- a/.github/workflows/pr-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -2,48 +2,11 @@ name: PR-CI on: pull_request: + types: [opened, reopened, synchronize] jobs: - unit-test: - if: always() - name: Unit test - runs-on: ${{ matrix.os }}-latest - timeout-minutes: 30 - strategy: - matrix: - os: [ubuntu, macos, windows] - java-version: [8] - include: - - os: ubuntu - java-version: 11 - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Cache maven repository - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-maven- - - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.java-version }} - distribution: adopt - - name: Generate coverage report - run: | - cd broker - mvn -B test --file pom.xml - - name: Publish Test Report - uses: mikepenz/action-junit-report@v3 - if: always() # always run even if the previous step fails - with: - report_paths: '**/surefire-reports/TEST-*.xml' - annotate_only: true dist-tar: - if: ${{ success() }} - name: Build dist tar - needs: [unit-test] + name: Build distribution tar runs-on: ubuntu-latest timeout-minutes: 120 steps: @@ -57,7 +20,7 @@ jobs: cache: "maven" - name: Build distribution tar run: | - mvn -Prelease-all -DskipTests clean install -U + mvn -Prelease-all -DskipTests -Dspotbugs.skip=true clean install -U - uses: actions/upload-artifact@v3 name: Upload distribution tar with: diff --git a/.github/workflows/pr-e2e-test.yml b/.github/workflows/pr-e2e-test.yml index e2c7e06b728..7530a23721e 100644 --- a/.github/workflows/pr-e2e-test.yml +++ b/.github/workflows/pr-e2e-test.yml @@ -47,7 +47,7 @@ jobs: ls - uses: actions/checkout@v3 with: - repository: cryptoya/rocketmq-docker.git + repository: apache/rocketmq-docker.git ref: master path: rocketmq-docker - name: Build and save docker images @@ -102,7 +102,7 @@ jobs: 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/cryptoya/rocketmq-docker.git" + 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 }} @@ -136,6 +136,13 @@ jobs: annotate_only: true include_passed: true detailed_summary: true + - uses: actions/upload-artifact@v3 + if: always() + name: Upload test log + with: + name: testlog.txt + path: testlog.txt + clean: if: always() diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index c23db0c938a..fd3483ed022 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -2,59 +2,19 @@ name: PUSH-CI on: push: + branches: [master, develop] #schedule: # - cron: "0 18 * * *" # TimeZone: UTC 0 concurrency: group: rocketmq-${{ github.ref }} - cancel-in-progress: true env: MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 jobs: - unit-test: - if: always() - name: Unit test - # needs: [] - runs-on: ${{ matrix.os }}-latest - timeout-minutes: 30 - strategy: - matrix: - os: [ubuntu, macos, windows] - java-version: [8] - include: - - os: ubuntu - java-version: 11 - steps: - - uses: actions/checkout@v3 - with: - submodules: true - - name: Cache maven repository - uses: actions/cache@v3 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: ${{ runner.os }}-maven- - - uses: actions/setup-java@v3 - with: - java-version: ${{ matrix.java-version }} - distribution: adopt - - name: Build and test - run: | - cd broker - mvn -B test --file pom.xml - - name: Publish Test Report - uses: mikepenz/action-junit-report@v3 - if: always() # always run even if the previous step fails - with: - report_paths: '**/surefire-reports/TEST-*.xml' - annotate_only: true - dist-tar: - if: ${{ success() }} name: Build dist tar - needs: [unit-test] runs-on: ubuntu-latest timeout-minutes: 30 steps: @@ -68,7 +28,7 @@ jobs: cache: "maven" - name: Build distribution tar run: | - mvn -Prelease-all -DskipTests clean install -U + mvn -Prelease-all -DskipTests -Dspotbugs.skip=true clean install -U - uses: actions/upload-artifact@v3 name: Upload distribution tar with: @@ -149,7 +109,7 @@ jobs: 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/cryptoya/rocketmq-docker.git" + 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 }} @@ -173,7 +133,7 @@ jobs: test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e.git" test-code-branch: "master" test-code-path: java/e2e - test-cmd: "mvn -B test" + test-cmd: "mvn -B test -Djunit.jupiter.execution.parallel.config.dynamic.factor=2" job-id: ${{ strategy.job-index }} - name: Publish Test Report uses: mikepenz/action-junit-report@v3 @@ -183,6 +143,12 @@ jobs: annotate_only: true include_passed: true detailed_summary: true + - uses: actions/upload-artifact@v3 + if: always() + name: Upload test log + with: + name: testlog.txt + path: testlog.txt clean: if: always() From 02f7fa713251fac7f848bd1c2bd4f9b8e50b503b Mon Sep 17 00:00:00 2001 From: deepsola Date: Fri, 10 Feb 2023 15:12:15 +0800 Subject: [PATCH 09/16] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 44ae3cce6dc..f05c8d01b87 100644 --- a/README.md +++ b/README.md @@ -244,4 +244,4 @@ services. [percentage-of-issues-still-open-image]: http://isitmaintained.com/badge/open/apache/rocketmq.svg [pencentage-of-issues-still-open-url]: http://isitmaintained.com/project/apache/rocketmq [twitter-follow-image]: https://img.shields.io/twitter/follow/ApacheRocketMQ?style=social -[twitter-follow-url]: https://twitter.com/intent/follow?screen_name=ApacheRocketMQ +[twitter-follow-url]: https://twitter.com/intent/follow?screen_name=ApacheRocketMQ From 274410e30a483a8f8a42cee32987becbbc3480b8 Mon Sep 17 00:00:00 2001 From: deepsola Date: Fri, 10 Feb 2023 16:19:03 +0800 Subject: [PATCH 10/16] Update push-ci.yml --- .github/workflows/push-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index fd3483ed022..fdf5852d140 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -133,7 +133,7 @@ jobs: test-code-git: "https://ghproxy.com/https://github.com/apache/rocketmq-e2e.git" test-code-branch: "master" test-code-path: java/e2e - test-cmd: "mvn -B test -Djunit.jupiter.execution.parallel.config.dynamic.factor=2" + test-cmd: "mvn -B test" job-id: ${{ strategy.job-index }} - name: Publish Test Report uses: mikepenz/action-junit-report@v3 From be678f1a65545070ce6682263efa6ce15de18861 Mon Sep 17 00:00:00 2001 From: yueya <102146039+cryptoya@users.noreply.github.com> Date: Wed, 15 Feb 2023 10:12:15 +0800 Subject: [PATCH 11/16] Create README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f05c8d01b87..8534d4b0356 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Apache RocketMQ +## Apache RocketMQ [![Build Status][maven-build-image]][maven-build-url] [![CodeCov][codecov-image]][codecov-url] From af664e2feadf2ee15237d2c220502a92392cd9f9 Mon Sep 17 00:00:00 2001 From: "wangtong.wt" Date: Fri, 17 Feb 2023 14:53:01 +0800 Subject: [PATCH 12/16] modify docker repo --- .github/workflows/pr-e2e-test.yml | 35 ++++++++++++++++++++++++------ .github/workflows/push-ci.yml | 36 ++++++++++++++++++++++++------- 2 files changed, 57 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pr-e2e-test.yml b/.github/workflows/pr-e2e-test.yml index 7530a23721e..28dafb28ef8 100644 --- a/.github/workflows/pr-e2e-test.yml +++ b/.github/workflows/pr-e2e-test.yml @@ -8,6 +8,12 @@ on: types: - completed +env: + DOCKER_REPO: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com/cicd/rocketmq + REGISTRY: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com + #DOCKER_REPO: apache/rocketmq-ci + #REGISTRY: + jobs: docker: runs-on: ubuntu-latest @@ -50,6 +56,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 +69,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 +106,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 +140,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 +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" diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index fdf5852d140..8b90514b46b 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -11,7 +11,11 @@ concurrency: env: MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 - + DOCKER_REPO: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com/cicd/rocketmq + REGISTRY: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com + #DOCKER_REPO: apache/rocketmq-ci + #REGISTRY: + jobs: dist-tar: name: Build dist tar @@ -56,6 +60,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 +73,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 +111,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 +144,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 +180,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" From 3b3d19b82289ae2252e97306227864ac5680e516 Mon Sep 17 00:00:00 2001 From: deepsola Date: Fri, 17 Feb 2023 15:55:50 +0800 Subject: [PATCH 13/16] Update push-ci.yml --- .github/workflows/push-ci.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index 8b90514b46b..cd6b9a46bdc 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -11,10 +11,9 @@ concurrency: env: MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 - DOCKER_REPO: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com/cicd/rocketmq - REGISTRY: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com - #DOCKER_REPO: apache/rocketmq-ci - #REGISTRY: + #DOCKER_REPO: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com/cicd/rocketmq + #REGISTRY: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com + DOCKER_REPO: wangtong719/ci-test jobs: dist-tar: From 577cfb7f42bd751b0c8fadee41a0a55d03595767 Mon Sep 17 00:00:00 2001 From: deepsola Date: Fri, 17 Feb 2023 17:05:43 +0800 Subject: [PATCH 14/16] Update pr-e2e-test.yml --- .github/workflows/pr-e2e-test.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr-e2e-test.yml b/.github/workflows/pr-e2e-test.yml index 28dafb28ef8..d6cbbaab066 100644 --- a/.github/workflows/pr-e2e-test.yml +++ b/.github/workflows/pr-e2e-test.yml @@ -9,10 +9,9 @@ on: - completed env: - DOCKER_REPO: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com/cicd/rocketmq - REGISTRY: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com - #DOCKER_REPO: apache/rocketmq-ci - #REGISTRY: + #DOCKER_REPO: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com/cicd/rocketmq + #REGISTRY: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com + DOCKER_REPO: wangtong719/ci-test jobs: docker: From fdfe77f220432478e4ca724769c94b1743324401 Mon Sep 17 00:00:00 2001 From: "wangtong.wt" Date: Tue, 21 Feb 2023 09:31:37 +0800 Subject: [PATCH 15/16] use apache/rocketmq-ci docker repo --- .github/workflows/pr-e2e-test.yml | 4 +--- .github/workflows/push-ci.yml | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-e2e-test.yml b/.github/workflows/pr-e2e-test.yml index d6cbbaab066..25976ca4f63 100644 --- a/.github/workflows/pr-e2e-test.yml +++ b/.github/workflows/pr-e2e-test.yml @@ -9,9 +9,7 @@ on: - completed env: - #DOCKER_REPO: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com/cicd/rocketmq - #REGISTRY: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com - DOCKER_REPO: wangtong719/ci-test + DOCKER_REPO: apache/rocketmq-ci jobs: docker: diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index cd6b9a46bdc..fb5d01c555d 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -11,9 +11,7 @@ concurrency: env: MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 - #DOCKER_REPO: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com/cicd/rocketmq - #REGISTRY: cn-cicd-repo-registry.cn-hangzhou.cr.aliyuncs.com - DOCKER_REPO: wangtong719/ci-test + DOCKER_REPO: apache/rocketmq-ci jobs: dist-tar: From 7de00df745aea91f38f9625300f2a132d1e13cd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=88=E4=BC=A2?= Date: Tue, 21 Feb 2023 10:54:19 +0800 Subject: [PATCH 16/16] Revert "Create README.md" This reverts commit be678f1a65545070ce6682263efa6ce15de18861. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d5226e3941d..77ad4f49262 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Apache RocketMQ +## Apache RocketMQ [![Build Status][maven-build-image]][maven-build-url] [![CodeCov][codecov-image]][codecov-url]