Skip to content

Commit

Permalink
Merge branch 'apache:develop' into get_all_msgRqMode
Browse files Browse the repository at this point in the history
  • Loading branch information
3424672656 authored Oct 19, 2024
2 parents ff04599 + 1e0b08f commit 0b610f2
Show file tree
Hide file tree
Showing 136 changed files with 3,419 additions and 841 deletions.
15 changes: 1 addition & 14 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ on:
- develop
- bazel

permissions:
actions: write

jobs:
build:
name: "bazel-compile (${{ matrix.os }})"
Expand All @@ -23,14 +20,4 @@ jobs:
- name: Build
run: bazel build --config=remote //...
- name: Run Tests
run: bazel test --config=remote //...
- name: Retry if failed
# if it failed , retry 2 times at most
if: failure() && fromJSON(github.run_attempt) < 3
continue-on-error: true
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Attempting to retry workflow..."
gh workflow run rerun-workflow.yml -F run_id=${{ github.run_id }}
run: bazel test --config=remote //...
45 changes: 45 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Run Integration Tests
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: [master, develop]

jobs:
it-test:
name: "maven-compile (${{ matrix.os }}, JDK-${{ matrix.jdk }})"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
jdk: [8]
steps:
- name: Cache Maven Repos
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Checkout
uses: actions/checkout@v2

- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.jdk }}
distribution: "adopt"
cache: "maven"

- name: Run integration tests with Maven
run: mvn clean verify -Pit-test -Pskip-unit-tests

- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: always()
with:
report_paths: 'test/target/failsafe-reports/TEST-*.xml'
annotate_only: true
include_passed: true
detailed_summary: true
16 changes: 1 addition & 15 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ on:
push:
branches: [master, develop, bazel]

permissions:
actions: write

jobs:
java_build:
name: "maven-compile (${{ matrix.os }}, JDK-${{ matrix.jdk }})"
Expand Down Expand Up @@ -44,15 +41,4 @@ jobs:
with:
name: jvm-crash-logs
path: /Users/runner/work/rocketmq/rocketmq/broker/hs_err_pid*.log
retention-days: 1

- name: Retry if failed
# if it failed , retry 2 times at most
if: failure() && fromJSON(github.run_attempt) < 3
continue-on-error: true
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "Attempting to retry workflow..."
gh workflow run rerun-workflow.yml -F run_id=${{ github.run_id }}
retention-days: 1
4 changes: 2 additions & 2 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Build distribution tar
run: |
mvn -Prelease-all -DskipTests -Dspotbugs.skip=true clean install -U
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Upload distribution tar
with:
name: rocketmq
Expand All @@ -30,7 +30,7 @@ jobs:
run: |
mkdir -p ./pr
echo ${{ github.event.number }} > ./pr/NR
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: pr
path: pr/
22 changes: 11 additions & 11 deletions .github/workflows/pr-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ jobs:
java-version: ["8"]
steps:
- name: 'Download artifact'
uses: actions/github-script@v3.1.0
uses: actions/github-script@v6
with:
script: |
var artifacts = await github.actions.listWorkflowRunArtifacts({
let artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{github.event.workflow_run.id }},
});
var matchArtifactRmq = artifacts.data.artifacts.filter((artifact) => {
let matchArtifactRmq = artifacts.data.artifacts.filter((artifact) => {
return artifact.name == "rocketmq"
})[0];
var download = await github.actions.downloadArtifact({
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifactRmq.id,
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
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 }} ${DOCKER_REPO}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
name: Upload distribution tar
with:
name: versionlist
Expand All @@ -85,7 +85,7 @@ jobs:
outputs:
version-json: ${{ steps.show_versions.outputs.version-json }}
steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
name: Download versionlist
with:
name: versionlist
Expand All @@ -96,6 +96,7 @@ jobs:
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
Expand Down Expand Up @@ -158,7 +159,7 @@ jobs:
annotate_only: true
include_passed: true
detailed_summary: true
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
name: Upload test log
with:
Expand Down Expand Up @@ -199,7 +200,7 @@ jobs:
annotate_only: true
include_passed: true
detailed_summary: true
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
name: Upload test log
with:
Expand Down Expand Up @@ -235,7 +236,7 @@ jobs:
annotate_only: true
include_passed: true
detailed_summary: true
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: always()
name: Upload test log
with:
Expand All @@ -258,5 +259,4 @@ jobs:
action: "clean"
ask-config: "${{ secrets.ASK_CONFIG_VIRGINA }}"
test-version: "${{ matrix.version }}"
job-id: ${{ strategy.job-index }}

job-id: ${{ strategy.job-index }}
Loading

0 comments on commit 0b610f2

Please sign in to comment.