Skip to content

Commit

Permalink
merge from dev/4.3.0 into main #2732
Browse files Browse the repository at this point in the history
merge from dev/4.3.0 into main
  • Loading branch information
yizhouxw committed Jun 12, 2024
2 parents 5bd8895 + 7afa242 commit 0bf0c38
Show file tree
Hide file tree
Showing 615 changed files with 21,824 additions and 3,850 deletions.
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
/server/integration-test/ @smallsheeeep @yhilmare @yizhouxw
/server/test-script/ @smallsheeeep @yhilmare @yizhouxw

# i18n
/server/odc-core/src/main/resources/i18n/ @Jane201510 @JessieWuJiexi @yizhouxw

# docs
/docs/ @Jane201510 @yhilmare @yizhouxw
Expand Down
59 changes: 45 additions & 14 deletions .github/workflows/build_artifact.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# 1. Manual trigger
# Jobs:
# 1. Calculate Version Number
# 2. Build Web Artifact (include front resource and only x86_64 platform for now)
# 2. Build Web Artifact
# 3. Build Client Artifact
###

Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
odc_docker_image_tag: ${{ steps.calculate_version.outputs.odc_docker_image_tag }}
steps:
- name: Checkout workspace
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Calculate version number
id: calculate_version
run: |
Expand All @@ -82,6 +82,37 @@ jobs:
echo "odc_docker_image_tag=${odc_docker_image_tag}" >> $GITHUB_OUTPUT
echo "odc_docker_image_tag=${odc_docker_image_tag}"
build-web-arm64:
name: Build Web Artifact (ARM64)
needs: [ calculate-version ]
runs-on: ubuntu-latest
env:
odc_rpm_release_number: ${{ needs.calculate-version.outputs.odc_rpm_release_number }}
odc_docker_image_tag: ${{ needs.calculate-version.outputs.odc_docker_image_tag }}
steps:
- name: Checkout workspace
uses: actions/checkout@v4
- name: Setup JDK 8
uses: actions/setup-java@v4
with:
java-version: "8"
distribution: "temurin"
cache: maven
- name: action by obfarm++odc_build_arm++BUILD_DOCKER_IMAGE=1;BUILD_RPM=1;BUILD_RPM_VERSION=${{ inputs.rpm_release }};BUILD_DOCKER_TAG=${{ env.odc_docker_image_tag }}
if: ${{ github.event.inputs.build_rpm == 'true' || github.event.inputs.build_docker == 'true' }}
uses: ./.github/obfarm/
id: build-web-arm64
with:
pipeline_id: ${{ github.run_id }}
project: ${{ github.repository }}
- name: Echo build result
if: ${{ github.event.inputs.build_rpm == 'true' || github.event.inputs.build_docker == 'true' }}
run: |
main_version="$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | cut -d - -f 1)"
new_version="${main_version}-${odc_rpm_release_number}"
echo "::notice ::BUILD RPM DOWNLOAD URL https://farm-use-for-odc.obs.cn-east-3.myhuaweicloud.com/odc-rpm/$GITHUB_RUN_ID/odc-server-${new_version}.aarch64.rpm"
echo "::notice ::BUILD DOCKER IMAGE DOWNLOAD URL https://farm-use-for-odc.obs.cn-east-3.myhuaweicloud.com/odc-image/$GITHUB_RUN_ID/odc-${{ env.odc_docker_image_tag }}-arm64.tar.gz"
build-web-x86_64:
name: Build Web Artifact (x86_64)
needs: [ calculate-version ]
Expand All @@ -91,17 +122,17 @@ jobs:
odc_docker_image_tag: ${{ needs.calculate-version.outputs.odc_docker_image_tag }}
steps:
- name: Checkout workspace
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Setup JDK 8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: "8"
distribution: "temurin"
cache: maven
- name: Setup node 16
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Build front static resources
Expand Down Expand Up @@ -172,7 +203,7 @@ jobs:
zip -d distribution/jar/odc-slim.jar "BOOT-INF/classes/static/*"
- name: Upload jar
if: ${{ github.event.inputs.build_jar == 'true' || github.event.inputs.build_client == 'true'}}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: odc-artifact-jar
path: |
Expand All @@ -190,7 +221,7 @@ jobs:
mv --verbose server/odc-server/target/rpm/odc-server/RPMS/*/odc-*.rpm distribution/docker/resources/
- name: Upload rpm (x86_64)
if: ${{ github.event.inputs.build_rpm == 'true' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: odc-server-${{ steps.set_release_version.outputs.new_version }}.x86_64.rpm
path: distribution/docker/resources/odc-*.rpm
Expand All @@ -205,7 +236,7 @@ jobs:
popd
- name: Upload docker image (x86_64)
if: ${{ github.event.inputs.build_docker == 'true' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: odc-${{ env.odc_docker_image_tag }}.tar.gz
path: distribution/docker/resources/odc-*.tar.gz
Expand All @@ -221,12 +252,12 @@ jobs:
target: [ win, mac, linux_x86, linux_aarch64 ]
steps:
- name: Checkout workspace
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: "recursive"
# Build jar failed when run on macos-latest, so we need to build and upload jar on ubuntu-latest in the above job
- name: Download resources
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: odc-artifact-jar
path: jar-dist
Expand All @@ -239,19 +270,19 @@ jobs:
mkdir -p client/libraries/java/starters
cp -R jar-dist/starters/. client/libraries/java/starters
- name: Setup node 16
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Install dependencies
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
Expand Down Expand Up @@ -293,7 +324,7 @@ jobs:
export CSC_IDENTITY_AUTO_DISCOVERY=false
node ./scripts/client/build.js ${{ matrix.target }}
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: odc-client-pkg-${{ matrix.target }}
path: |
Expand Down
65 changes: 47 additions & 18 deletions .github/workflows/build_daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# 1. Check Code Format
# 2. PMD Scan
# 3. Calculate Version Number
# 4. Build Web Artifact (include front resource and only x86_64 platform for now)
# 4. Build Web Artifact
# 5. Build Client Artifact
###

Expand Down Expand Up @@ -39,9 +39,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout workspace
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup JDK 8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: "8"
distribution: "temurin"
Expand All @@ -56,9 +56,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout workspace
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup JDK 8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: "8"
distribution: "temurin"
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
odc_docker_image_tag: ${{ steps.calculate_version.outputs.odc_docker_image_tag }}
steps:
- name: Checkout workspace
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Calculate version number
id: calculate_version
run: |
Expand All @@ -108,6 +108,35 @@ jobs:
echo "odc_docker_image_tag=${odc_docker_image_tag}" >> $GITHUB_OUTPUT
echo "odc_docker_image_tag=${odc_docker_image_tag}"
build-web-arm64:
name: Build Web Artifact (ARM64)
needs: [ calculate-version ]
runs-on: ubuntu-latest
env:
odc_rpm_release_number: ${{ needs.calculate-version.outputs.odc_rpm_release_number }}
odc_docker_image_tag: ${{ needs.calculate-version.outputs.odc_docker_image_tag }}
steps:
- name: Checkout workspace
uses: actions/checkout@v4
- name: Setup JDK 8
uses: actions/setup-java@v4
with:
java-version: "8"
distribution: "temurin"
cache: maven
- name: action by obfarm++odc_build_arm++BUILD_DOCKER_IMAGE=1;BUILD_RPM=1;BUILD_RPM_VERSION=${{ inputs.rpm_release }};BUILD_DOCKER_TAG=${{ env.odc_docker_image_tag }}
uses: ./.github/obfarm/
id: build-web-arm64
with:
pipeline_id: ${{ github.run_id }}
project: ${{ github.repository }}
- name: Echo Build Result
run: |
main_version="$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout | cut -d - -f 1)"
new_version="${main_version}-${odc_rpm_release_number}"
echo "::notice ::BUILD RPM DOWNLOAD URL https://farm-use-for-odc.obs.cn-east-3.myhuaweicloud.com/odc-rpm/$GITHUB_RUN_ID/odc-server-${new_version}.aarch64.rpm"
echo "::notice ::BUILD DOCKER IMAGE DOWNLOAD URL https://farm-use-for-odc.obs.cn-east-3.myhuaweicloud.com/odc-image/$GITHUB_RUN_ID/odc-${{ env.odc_docker_image_tag }}-arm64.tar.gz"
build-web-x86_64:
name: Build Web Artifact (x86_64)
needs: [ calculate-version ]
Expand All @@ -117,17 +146,17 @@ jobs:
odc_docker_image_tag: ${{ needs.calculate-version.outputs.odc_docker_image_tag }}
steps:
- name: Checkout workspace
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Setup JDK 8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: "8"
distribution: "temurin"
cache: maven
- name: Setup node 16
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Build front static resources
Expand Down Expand Up @@ -197,15 +226,15 @@ jobs:
cp -fv distribution/jar/odc.jar distribution/jar/odc-slim.jar
zip -d distribution/jar/odc-slim.jar "BOOT-INF/classes/static/*"
- name: Upload jar
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: odc-artifact-jar
path: |
distribution/plugins/*.jar
distribution/starters/*.jar
distribution/jar/*.jar
- name: Upload rpm (x86_64)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: odc-server-${{ steps.set_release_version.outputs.new_version }}.x86_64.rpm
path: distribution/docker/resources/odc-*.rpm
Expand All @@ -218,7 +247,7 @@ jobs:
docker save -o resources/odc-${odc_docker_image_tag}.tar.gz docker.io/oceanbase/odc:${odc_docker_image_tag}
popd
- name: Upload docker image (x86_64)
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: odc-${{ env.odc_docker_image_tag }}.tar.gz
path: distribution/docker/resources/odc-*.tar.gz
Expand All @@ -233,11 +262,11 @@ jobs:
target: [ win, mac, linux_x86, linux_aarch64 ]
steps:
- name: Checkout workspace
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Download resources
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: odc-artifact-jar
path: jar-dist
Expand All @@ -250,19 +279,19 @@ jobs:
mkdir -p client/libraries/java/starters
cp -R jar-dist/starters/. client/libraries/java/starters
- name: Setup node 16
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Install dependencies
uses: pnpm/action-setup@v2
uses: pnpm/action-setup@v4
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
Expand Down Expand Up @@ -304,7 +333,7 @@ jobs:
export CSC_IDENTITY_AUTO_DISCOVERY=false
node ./scripts/client/build.js ${{ matrix.target }}
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: odc-client-pkg-${{ matrix.target }}
path: |
Expand Down
Loading

0 comments on commit 0bf0c38

Please sign in to comment.