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

zhonghongsheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 3a2e4538a9b Refactor e2e-operation.yml for better extension (#37950)
3a2e4538a9b is described below

commit 3a2e4538a9bf174e2521d90d12ef7b2df6a87b7d
Author: Hongsheng Zhong <[email protected]>
AuthorDate: Wed Feb 4 12:02:28 2026 +0800

    Refactor e2e-operation.yml for better extension (#37950)
---
 .github/workflows/e2e-operation.yml         | 23 ++++++++++++++---------
 .github/workflows/nightly-e2e-operation.yml | 25 +++++++++++++++----------
 2 files changed, 29 insertions(+), 19 deletions(-)

diff --git a/.github/workflows/e2e-operation.yml 
b/.github/workflows/e2e-operation.yml
index 64da98bd53c..e9f7f8b873b 100644
--- a/.github/workflows/e2e-operation.yml
+++ b/.github/workflows/e2e-operation.yml
@@ -49,8 +49,8 @@ jobs:
     outputs:
       changed_operations: ${{ steps.filter.outputs.changes }}
 
-  build-e2e-image:
-    name: Build E2E Image
+  prepare-e2e-artifacts:
+    name: Prepare E2E Artifacts
     if: github.repository == 'apache/shardingsphere' && 
needs.detect-changed-files.outputs.changed_operations != '[]' && 
needs.detect-changed-files.outputs.changed_operations != '["ignore"]'
     needs: global-environment
     runs-on: ubuntu-latest
@@ -62,10 +62,15 @@ jobs:
           distribution: 'temurin'
           java-version: 17
           cache: 'maven'
-      - name: Maven Install for E2E Image
-        # transaction, pipeline, showprocesslist
-        run: ./mvnw -B clean install -am -pl 
test/e2e/operation/transaction,test/e2e/operation/pipeline,test/e2e/operation/showprocesslist
 -Pe2e.env.docker -DskipTests
-      - name: Package Maven Repository
+      - name: Maven Install
+        env:
+          PREFIX: "test/e2e/operation/"
+          MODULE_LIST: "transaction,pipeline,showprocesslist"
+        run: |
+          FORMATTED_PL=$(echo "$MODULE_LIST" | sed "s|,|,$PREFIX|g" | sed 
"s|^|$PREFIX|")
+          echo "Ready to build: $FORMATTED_PL"
+          ./mvnw -B clean install -am -pl "$FORMATTED_PL" -Pe2e.env.docker 
-DskipTests
+      - name: Package shardingsphere Maven Repository
         run: |
           tar -czf /tmp/maven-repo-output.tar.gz -C ~/.m2/repository 
org/apache/shardingsphere
       - name: Save E2E Image
@@ -82,7 +87,7 @@ jobs:
   e2e-operation:
     name: E2E - ${{ matrix.operation }} on ${{ matrix.image.version }}
     if: github.repository == 'apache/shardingsphere' && 
needs.detect-changed-files.outputs.changed_operations != '[]' && 
needs.detect-changed-files.outputs.changed_operations != '["ignore"]'
-    needs: [ detect-changed-files, global-environment, build-e2e-image ]
+    needs: [ detect-changed-files, global-environment, prepare-e2e-artifacts ]
     runs-on: ubuntu-latest
     timeout-minutes: 40
     strategy:
@@ -113,12 +118,12 @@ jobs:
           distribution: 'temurin'
           java-version: 17
           cache: 'maven'
-      - name: Download Artifacts
+      - name: Download Build Artifacts
         uses: actions/download-artifact@v4
         with:
           name: build-outputs
           path: /tmp/
-      - name: Restore Maven Repository
+      - name: Restore shardingsphere Maven Repository
         run: |
           mkdir -p ~/.m2/repository
           tar -xzf /tmp/maven-repo-output.tar.gz -C ~/.m2/repository
diff --git a/.github/workflows/nightly-e2e-operation.yml 
b/.github/workflows/nightly-e2e-operation.yml
index eb78349bc07..d9e57e93cb9 100644
--- a/.github/workflows/nightly-e2e-operation.yml
+++ b/.github/workflows/nightly-e2e-operation.yml
@@ -39,11 +39,11 @@ jobs:
     name: Import Global Environment
     uses: ./.github/workflows/required-reusable.yml
 
-  build-e2e-image:
+  prepare-e2e-artifacts:
     if: ${{ needs.global-environment.outputs.GLOBAL_IS_NIGHTLY_JOB_EXECUTABLE 
== 'true' }}
-    name: Build E2E Image
+    name: Prepare E2E Artifacts
     needs: global-environment
-    runs-on: ubuntu-latest
+    runs-on: ${{ needs.global-environment.outputs.GLOBAL_RUNS_ON }}
     timeout-minutes: 40
     steps:
       - uses: actions/[email protected]
@@ -52,10 +52,15 @@ jobs:
           distribution: 'temurin'
           java-version: 17
           cache: 'maven'
-      - name: Maven Install for E2E Image
-        # transaction, pipeline, showprocesslist
-        run: ./mvnw -B clean install -am -pl 
test/e2e/operation/transaction,test/e2e/operation/pipeline,test/e2e/operation/showprocesslist
 -Pe2e.env.docker -DskipTests
-      - name: Package Maven Repository
+      - name: Maven Install
+        env:
+          PREFIX: "test/e2e/operation/"
+          MODULE_LIST: "transaction,pipeline,showprocesslist"
+        run: |
+          FORMATTED_PL=$(echo "$MODULE_LIST" | sed "s|,|,$PREFIX|g" | sed 
"s|^|$PREFIX|")
+          echo "Ready to build: $FORMATTED_PL"
+          ./mvnw -B clean install -am -pl "$FORMATTED_PL" -Pe2e.env.docker 
-DskipTests
+      - name: Package shardingsphere Maven Repository
         run: |
           tar -czf /tmp/maven-repo-output.tar.gz -C ~/.m2/repository 
org/apache/shardingsphere
       - name: Save E2E Image
@@ -72,7 +77,7 @@ jobs:
   e2e-operation-job:
     if: ${{ needs.global-environment.outputs.GLOBAL_IS_NIGHTLY_JOB_EXECUTABLE 
== 'true' }}
     name: E2E - ${{ matrix.operation }} on ${{ matrix.image.version }} with 
JDK ${{ matrix.java-version }}
-    needs: [ global-environment, build-e2e-image ]
+    needs: [ global-environment, prepare-e2e-artifacts ]
     runs-on: ${{ needs.global-environment.outputs.GLOBAL_RUNS_ON }}
     timeout-minutes: 150
     strategy:
@@ -108,12 +113,12 @@ jobs:
           distribution: 'temurin'
           java-version: ${{ matrix.java-version }}
           cache: 'maven'
-      - name: Download Artifacts
+      - name: Download Build Artifacts
         uses: actions/download-artifact@v4
         with:
           name: build-outputs
           path: /tmp/
-      - name: Restore Maven Repository
+      - name: Restore shardingsphere Maven Repository
         run: |
           mkdir -p ~/.m2/repository
           tar -xzf /tmp/maven-repo-output.tar.gz -C ~/.m2/repository

Reply via email to