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

djwang pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git


The following commit(s) were added to refs/heads/cbdb-postgres-merge by this 
push:
     new 2a8a401aed0 PG16: add more CI workflows from main (#1613)
2a8a401aed0 is described below

commit 2a8a401aed0ad3c0db6248f4f2fa26d7ffee4c17
Author: Dianjin Wang <[email protected]>
AuthorDate: Fri Mar 13 10:29:28 2026 +0800

    PG16: add more CI workflows from main (#1613)
    
    * PG16: add more CI workflows from main
    * Add ICU library for Rocky8/9 CI workflows
    * Add greenplum_schedule & isolation2 tests for PG16
---
 .github/workflows/apache-rat-audit.yml             | 347 ++++++++++
 ...-cloudberry.yml => build-cloudberry-rocky8.yml} | 314 ++++++---
 .github/workflows/build-cloudberry.yml             | 250 +++++--
 ...ild-cloudberry.yml => build-deb-cloudberry.yml} | 733 ++++++++++++---------
 .github/workflows/pg16-merge-validation.yml        |  25 +-
 5 files changed, 1211 insertions(+), 458 deletions(-)

diff --git a/.github/workflows/apache-rat-audit.yml 
b/.github/workflows/apache-rat-audit.yml
new file mode 100644
index 00000000000..3b457598224
--- /dev/null
+++ b/.github/workflows/apache-rat-audit.yml
@@ -0,0 +1,347 @@
+# --------------------------------------------------------------------
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed
+# with this work for additional information regarding copyright
+# ownership. The ASF licenses this file to You under the Apache
+# License, Version 2.0 (the "License"); you may not use this file
+# except in compliance with the License. You may obtain a copy of the
+# License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied. See the License for the specific language governing
+# permissions and limitations under the License.
+#
+# --------------------------------------------------------------------
+# Apache Cloudberry (Incubating) Compliance Workflow
+#
+# Comprehensive compliance checks for Apache Cloudberry:
+# 1. Apache RAT license header validation
+# 2. Copyright year verification (NOTICE and psql help.c)
+# 3. Binary file presence detection with approved allowlist
+#
+# Based on Apache Rat tool, run locally with:
+# `mvn clean verify -Drat.consoleOutput=true`
+# --------------------------------------------------------------------
+
+name: Apache Rat License Check
+
+on:
+  push:
+    branches: [main, cbdb-postgres-merge]
+  pull_request:
+    branches: [main, cbdb-postgres-merge]
+    types: [opened, synchronize, reopened, edited]
+  workflow_dispatch:
+
+permissions:
+  contents: read
+
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: true
+
+jobs:
+  rat-check:
+    runs-on: ubuntu-latest
+    timeout-minutes: 10
+
+    steps:
+      - name: Check out repository
+        uses: actions/checkout@v4
+        with:
+          fetch-depth: 1
+
+      - name: Set up Java and Maven
+        uses: actions/setup-java@v3
+        with:
+          distribution: 'temurin'
+          java-version: '11'
+          cache: maven
+
+      - name: Run Apache Rat check
+        run: |
+          echo "Running Apache Rat license check..."
+          mvn clean verify -Drat.consoleOutput=true | tee rat-output.log
+          
+          # Check for build failure
+          if grep -q "\[INFO\] BUILD FAILURE" rat-output.log; then
+            echo "::error::Apache Rat check failed - build failure detected"
+            echo "RAT_CHECK=fail" >> $GITHUB_ENV
+          else
+            echo "RAT_CHECK=pass" >> $GITHUB_ENV
+            echo "Apache Rat check passed successfully"
+          fi
+
+      - name: Check copyright years are up-to-date
+        run: |
+          echo "Checking copyright years..."
+          current_year=$(date -u +"%Y")
+          echo "CURRENT_YEAR=$current_year" >> $GITHUB_ENV
+
+          # Initialize to pass, will be updated if checks fail
+          echo "NOTICE_CHECK=pass" >> $GITHUB_ENV
+          echo "PSQL_HELP_CHECK=pass" >> $GITHUB_ENV
+
+          # Check NOTICE file
+          echo "Checking NOTICE file..."
+          if ! grep -q "Copyright 2024-$current_year The Apache Software 
Foundation" NOTICE; then
+            echo "::error::NOTICE file does not contain the current year 
($current_year)"
+            echo "NOTICE_CHECK=fail" >> $GITHUB_ENV
+          else
+            echo "PASS: NOTICE file contains the current year ($current_year)"
+          fi
+          
+          # Check psql help.c file
+          echo "Checking src/bin/psql/help.c..."
+          if ! grep -q "Copyright 2024-$current_year The Apache Software 
Foundation" src/bin/psql/help.c; then
+            echo "::error::src/bin/psql/help.c does not contain the current 
year ($current_year)"
+            echo "PSQL_HELP_CHECK=fail" >> $GITHUB_ENV
+          else
+            echo "PASS: src/bin/psql/help.c contains the current year 
($current_year)"
+          fi
+          
+          # Continue execution even if checks fail
+          if [ "$NOTICE_CHECK" = "pass" ] && [ "$PSQL_HELP_CHECK" = "pass" ]; 
then
+            echo "All copyright year checks passed"
+          else
+            echo "Copyright year checks completed with errors"
+          fi
+
+      - name: Check for binary files
+        run: |
+          echo "Checking for binary files..."
+          echo "Checking extensions: class, jar, tar, tgz, zip, exe, dll, so, 
gz, bz2"
+          echo 
"----------------------------------------------------------------------"
+          
+          # Binary file allowlist, see README.apache.md
+          ALLOWLIST=(
+            "contrib/formatter_fixedwidth/data/fixedwidth_small_correct.tbl.gz"
+            "gpMgmt/demo/gppkg/sample-sources.tar.gz"
+            "src/bin/gpfdist/regress/data/exttab1/nation.tbl.gz"
+            "src/bin/gpfdist/regress/data/gpfdist2/gz_multi_chunk.tbl.gz"
+            "src/bin/gpfdist/regress/data/gpfdist2/gz_multi_chunk_2.tbl.gz"
+            "src/bin/gpfdist/regress/data/gpfdist2/lineitem.tbl.bz2"
+            "src/bin/gpfdist/regress/data/gpfdist2/lineitem.tbl.gz"
+          )
+          
+          # Check for specific binary file extensions
+          binary_extensions="class jar tar tgz zip exe dll so gz bz2"
+          echo "BINARY_EXTENSIONS=${binary_extensions}" >> $GITHUB_ENV
+          binary_results=""
+          binaryfiles_found=false
+          
+          for extension in ${binary_extensions}; do
+            printf "Checking *.%-4s files..." "${extension}"
+            found=$(find . -name "*.${extension}" -type f || true)
+            
+            # Filter out allowed files
+            if [ -n "$found" ]; then
+              filtered_found=""
+              while IFS= read -r file; do
+                is_allowed=false
+                for allowlist_file in "${ALLOWLIST[@]}"; do
+                  if [ "$file" = "./$allowlist_file" ]; then
+                    is_allowed=true
+                    echo "Allowed: $file" >> binary_allowlist.txt
+                    break
+                  fi
+                done
+                if [ "$is_allowed" = false ]; then
+                  filtered_found+="$file"$'\n'
+                fi
+              done <<< "$found"
+              
+              filtered_found=$(echo "$filtered_found" | sed '/^$/d')
+              
+              if [ -n "$filtered_found" ]; then
+                echo "FOUND"
+                echo "::error::${extension} files should not exist"
+                echo "For ASF compatibility: the source tree should not 
contain"
+                echo "binary files as users have a hard time verifying their 
contents."
+                echo "Found files:"
+                echo "$filtered_found" | sed 's/^/  /'
+                echo "${extension}:${filtered_found}" >> binary_results.txt
+                binaryfiles_found=true
+              else
+                echo "NONE (all allowed)"
+                echo "${extension}:none" >> binary_results.txt
+              fi
+            else
+              echo "NONE"
+              echo "${extension}:none" >> binary_results.txt
+            fi
+          done
+          
+          echo 
"----------------------------------------------------------------------"
+          if [ "$binaryfiles_found" = true ]; then
+            echo "ERROR: Non-allowed binary files were found in the source 
tree"
+            echo "BINARY_CHECK=fail" >> $GITHUB_ENV
+          else
+            echo "PASS: No non-allowed binary files found"
+            echo "BINARY_CHECK=pass" >> $GITHUB_ENV
+          fi
+          
+          # Show allowlist summary if any allowed files were found
+          if [ -f binary_allowlist.txt ]; then
+            echo ""
+            echo "Allowed binary files (approved):"
+            cat binary_allowlist.txt | sed 's/^/  /'
+          fi
+
+      - name: Upload Rat check results
+        if: always()
+        uses: actions/upload-artifact@v4
+        with:
+          name: rat-check-results
+          path: rat-output.log
+          retention-days: 7
+
+      - name: Generate Job Summary
+        if: always()
+        run: |
+          {
+            echo "## Apache Cloudberry Compliance Audit Results"
+            echo "- Run Time: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
+            echo ""
+            
+            # Copyright Year Check Summary
+            echo "### Copyright Year Checks"
+            echo "**NOTICE file:**"
+            if [ "$NOTICE_CHECK" = "pass" ]; then
+              echo "PASS: Contains current year ($CURRENT_YEAR)"
+            else
+              echo "ERROR: Does not contain current year ($CURRENT_YEAR)"
+            fi
+            echo ""
+            echo "**psql help.c:**"
+            if [ "$PSQL_HELP_CHECK" = "pass" ]; then
+              echo "PASS: Contains current year ($CURRENT_YEAR)"
+            else
+              echo "ERROR: Does not contain current year ($CURRENT_YEAR)"
+            fi
+            echo ""
+
+            # Binary Files Check Summary
+            echo "### Binary Files Check"
+            echo "Checked extensions: \`${BINARY_EXTENSIONS}\`"
+            echo ""
+            echo "Results:"
+            echo "\`\`\`"
+            if [ -f binary_results.txt ]; then
+              while IFS=: read -r ext files; do
+                if [ "$files" = "none" ]; then
+                  echo "PASS: No .${ext} files found"
+                else
+                  echo "ERROR: Found .${ext} files:"
+                  echo "$files" | sed 's/^/  /'
+                fi
+              done < binary_results.txt
+            fi
+            echo "\`\`\`"
+            echo ""
+            
+            # Allowlist summary
+            if [ -f binary_allowlist.txt ]; then
+              echo "### Allowed Binary Files"
+              echo "The following binary files are approved for testing 
purposes:"
+              echo "You can see 
[README.apache.md](https://github.com/apache/cloudberry/blob/main/README.apache.md)
 for details."
+              echo "\`\`\`"
+              cat binary_allowlist.txt | sed 's/Allowed: //'
+              echo "\`\`\`"
+              echo ""
+            fi
+
+            # Rat check summary
+            if [[ -f rat-output.log ]]; then
+              # First extract and display summary statistics (only once)
+              if grep -q "Rat check: Summary over all files" rat-output.log; 
then
+                echo "### License Header Check"
+                summary_line=$(grep "Rat check: Summary over all files" 
rat-output.log)
+                echo "\`\`\`"
+                echo "$summary_line"
+                echo "\`\`\`"
+                echo ""
+              fi
+
+              # Then determine the result status
+              if [ "$RAT_CHECK" = "fail" ]; then
+                echo "#### Check Failed - License Compliance Issues Detected"
+                echo ""
+
+                # Extract and display files with unapproved licenses
+                if grep -q "Files with unapproved licenses:" rat-output.log; 
then
+                  echo "##### Files with Unapproved Licenses"
+                  echo "\`\`\`"
+                  # Get the line with "Files with unapproved licenses:" and 
all following lines until the dashed line
+                  sed -n '/Files with unapproved licenses:/,/\[INFO\] 
------------------------------------------------------------------------/p' 
rat-output.log | \
+                    grep -v "\[INFO\] 
------------------------------------------------------------------------" | \
+                    grep -v "^$" | \
+                    head -20
+                  echo "\`\`\`"
+                  echo ""
+                fi
+
+                echo "**How to fix:**"
+                echo ""
+                echo "**For new original files you created:**"
+                echo "- Add the standard Apache License header to each file"
+                echo ""
+                echo "**For third-party files with different licenses:**"
+                echo "- Add the file to exclusion list in \`pom.xml\` under 
the rat-maven-plugin configuration"
+                echo "- Ensure the license is compatible with Apache License 
2.0"
+                echo "- Avoid introducing components with incompatible 
licenses"
+                echo ""
+                echo "**Need help?**"
+                echo "- Run \`mvn clean verify -Drat.consoleOutput=true\` 
locally for the full report"
+                echo "- Email [email protected] if you have questions 
about license compatibility"
+
+              elif [ "$RAT_CHECK" = "pass" ]; then
+                echo "#### Check Passed - All Files Comply with Apache License 
Requirements"
+              fi
+            fi
+          } >> "$GITHUB_STEP_SUMMARY"
+
+      - name: Report Status
+        if: always()
+        shell: bash {0}
+        run: |
+          # Check overall status of all checks
+          overall_status=0
+          
+          # Check Apache RAT status
+          if [ "$RAT_CHECK" = "fail" ]; then
+            echo "ERROR: Apache Rat check failed"
+            overall_status=1
+          elif [ "$RAT_CHECK" = "pass" ]; then
+            echo "Apache Rat check passed"
+          fi
+          
+          # Check copyright year status
+          if [ -n "$NOTICE_CHECK" ] && [ "$NOTICE_CHECK" = "fail" ]; then
+            echo "ERROR: NOTICE file copyright year check failed"
+            overall_status=1
+          fi
+          if [ -n "$PSQL_HELP_CHECK" ] && [ "$PSQL_HELP_CHECK" = "fail" ]; then
+            echo "ERROR: psql help.c copyright year check failed"
+            overall_status=1
+          fi
+          
+          # Check binary files status (if this variable exists)
+          if [ -n "$BINARY_CHECK" ] && [ "$BINARY_CHECK" = "fail" ]; then
+            echo "ERROR: Binary files check failed"
+            overall_status=1
+          fi
+          
+          # Exit with appropriate status
+          if [ $overall_status -eq 0 ]; then
+            echo "SUCCESS: All checks passed"
+            exit 0
+          else
+            echo "FAILURE: One or more checks failed"
+            exit 1
+          fi
diff --git a/.github/workflows/build-cloudberry.yml 
b/.github/workflows/build-cloudberry-rocky8.yml
similarity index 84%
copy from .github/workflows/build-cloudberry.yml
copy to .github/workflows/build-cloudberry-rocky8.yml
index a6e659596b5..bd4d5b94b5c 100644
--- a/.github/workflows/build-cloudberry.yml
+++ b/.github/workflows/build-cloudberry-rocky8.yml
@@ -17,12 +17,12 @@
 # permissions and limitations under the License.
 #
 # --------------------------------------------------------------------
-# GitHub Actions Workflow: Apache Cloudberry Build Pipeline
+# GitHub Actions Workflow: Apache Cloudberry Build Pipeline (Rocky 8)
 # --------------------------------------------------------------------
 # Description:
 #
 #   This workflow builds, tests, and packages Apache Cloudberry on
-#   Rocky Linux 9. It ensures artifact integrity, performs installation
+#   Rocky Linux 8. It ensures artifact integrity, performs installation
 #   tests, validates key operations, and provides detailed test reports,
 #   including handling for ignored test cases.
 #
@@ -67,7 +67,7 @@
 #    - Sends failure notifications if any step fails.
 #
 # Execution Environment:
-# - **Runs On**: ubuntu-22.04 with Rocky Linux 9 containers.
+# - **Runs On**: ubuntu-22.04 with Rocky Linux 8 containers.
 # - **Resource Requirements**:
 #   - Disk: Minimum 20GB free space.
 #   - Memory: Minimum 8GB RAM.
@@ -75,12 +75,13 @@
 #
 # Triggers:
 # - Push to `main` branch.
-# - Pull requests to `main` branch.
+# - Pull request that modifies this workflow file.
+# - Scheduled: Every Monday at 02:00 UTC.
 # - Manual workflow dispatch.
 #
 # Container Images:
-# - **Build**: `apache/incubator-cloudberry:cbdb-build-rocky9-latest`
-# - **Test**: `apache/incubator-cloudberry:cbdb-test-rocky9-latest`
+# - **Build**: `apache/incubator-cloudberry:cbdb-build-rocky8-latest`
+# - **Test**: `apache/incubator-cloudberry:cbdb-test-rocky8-latest`
 #
 # Artifacts:
 # - RPM Package          (retention: ${{ env.LOG_RETENTION_DAYS }} days).
@@ -98,14 +99,20 @@
 # - Supports debug builds with preserved symbols.
 # --------------------------------------------------------------------
 
-name: Apache Cloudberry Build
+name: Apache Cloudberry Build (Rocky 8)
 
 on:
   push:
-    branches: [main]
+    branches: [main, cbdb-postgres-merge]
   pull_request:
-    branches: [main]
-    types: [opened, synchronize, reopened, edited]
+    paths:
+      - '.github/workflows/build-cloudberry-rocky8.yml'
+    # We can enable the PR test when needed
+    # branches: [main, cbdb-postgres-merge]
+    # types: [opened, synchronize, reopened, edited]
+  schedule:
+    # Run every Monday at 02:00 UTC
+    - cron: '0 2 * * 1'
   workflow_dispatch:
     inputs:
       test_selection:
@@ -113,6 +120,11 @@ on:
         required: false
         default: 'all'
         type: string
+      reuse_artifacts_from_run_id:
+        description: 'Reuse build artifacts from a previous run ID (leave 
empty to build fresh)'
+        required: false
+        default: ''
+        type: string
 
 concurrency:
   group: ${{ github.workflow }}-${{ github.ref }}
@@ -281,23 +293,29 @@ jobs:
               },
               {"test":"ic-contrib",
                "make_configs":["contrib/auto_explain:installcheck",
+                               "contrib/amcheck:installcheck",
                                "contrib/citext:installcheck",
                                "contrib/btree_gin:installcheck",
+                               "contrib/btree_gist:installcheck",
+                               "contrib/dblink:installcheck",
+                               "contrib/dict_int:installcheck",
+                               "contrib/dict_xsyn:installcheck",
+                               "contrib/extprotocol:installcheck",
                                "contrib/file_fdw:installcheck",
                                "contrib/formatter_fixedwidth:installcheck",
-                               "contrib/extprotocol:installcheck",
-                               "contrib/dblink:installcheck",
+                               "contrib/hstore:installcheck",
+                               "contrib/indexscan:installcheck",
                                "contrib/pg_trgm:installcheck",
                                "contrib/indexscan:installcheck",
-                               "contrib/hstore:installcheck",
                                "contrib/pgcrypto:installcheck",
+                               "contrib/pgstattuple:installcheck",
                                "contrib/tablefunc:installcheck",
                                "contrib/passwordcheck:installcheck",
+                               "contrib/pg_buffercache:installcheck",
                                "contrib/sslinfo:installcheck"]
               },
               {"test":"ic-gpcontrib",
                "make_configs":["gpcontrib/orafce:installcheck",
-                               "gpcontrib/pxf_fdw:installcheck",
                                "gpcontrib/zstd:installcheck",
                                "gpcontrib/gp_sparse_vector:installcheck",
                                "gpcontrib/gp_toolkit:installcheck"]
@@ -309,12 +327,18 @@ jobs:
               {"test":"ic-isolation2",
                "make_configs":["src/test/isolation2:installcheck-isolation2"]
               },
+              {"test":"ic-isolation2-hot-standby",
+               "make_configs":["src/test/isolation2:installcheck-hot-standby"]
+              },
               {"test":"ic-isolation2-crash",
                
"make_configs":["src/test/isolation2:installcheck-isolation2-crash"],
                "enable_core_check":false
               },
               {"test":"ic-parallel-retrieve-cursor",
                
"make_configs":["src/test/isolation2:installcheck-parallel-retrieve-cursor"]
+              },
+              {"test":"ic-cbdb-parallel",
+               "make_configs":["src/test/regress:installcheck-cbdb-parallel"]
               }
             ]
           }'
@@ -400,22 +424,48 @@ jobs:
   ## ======================================================================
 
   build:
-    name: Build Apache Cloudberry RPM
+    name: Build Apache Cloudberry RPM (Rocky 8)
     env:
       JOB_TYPE: build
     needs: [check-skip]
     runs-on: ubuntu-22.04
     timeout-minutes: 120
+    if: github.event.inputs.reuse_artifacts_from_run_id == ''
     outputs:
       build_timestamp: ${{ steps.set_timestamp.outputs.timestamp }}
 
     container:
-      image: apache/incubator-cloudberry:cbdb-build-rocky9-latest
+      image: apache/incubator-cloudberry:cbdb-build-rocky8-latest
       options: >-
         --user root
         -h cdw
+        -v /usr/share:/host_usr_share
+        -v /usr/local:/host_usr_local
+        -v /opt:/host_opt
 
     steps:
+      - name: Free Disk Space
+        if: needs.check-skip.outputs.should_skip != 'true'
+        run: |
+          echo "=== Disk space before cleanup ==="
+          df -h /
+
+          # Remove pre-installed tools from host to free disk space
+          rm -rf /host_opt/hostedtoolcache || true   # GitHub Actions tool 
cache
+          rm -rf /host_usr_local/lib/android || true # Android SDK
+          rm -rf /host_usr_share/dotnet || true      # .NET SDK
+          rm -rf /host_opt/ghc || true               # Haskell GHC
+          rm -rf /host_usr_local/.ghcup || true      # Haskell GHCup
+          rm -rf /host_usr_share/swift || true       # Swift
+          rm -rf /host_usr_local/share/powershell || true  # PowerShell
+          rm -rf /host_usr_local/share/chromium || true    # Chromium
+          rm -rf /host_usr_share/miniconda || true   # Miniconda
+          rm -rf /host_opt/az || true                # Azure CLI
+          rm -rf /host_usr_share/sbt || true         # Scala Build Tool
+
+          echo "=== Disk space after cleanup ==="
+          df -h /
+
       - name: Skip Check
         if: needs.check-skip.outputs.should_skip == 'true'
         run: |
@@ -437,23 +487,44 @@ jobs:
           fetch-depth: 1
           submodules: true
 
-      - name: Checkout CI Build/Test Scripts
+      - name: Checkout DevOps Scripts from Main Branch
         if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/checkout@v4
         with:
-          repository: apache/cloudberry-devops-release
+          repository: ${{ github.repository }}
           ref: main
-          path: cloudberry-devops-release
-          fetch-depth: 1
+          sparse-checkout: |
+            devops/
+          sparse-checkout-cone-mode: false
+          path: main-devops
 
-      - name: Move cloudberry-devops-release directory
+      - name: Setup DevOps Scripts
         if: needs.check-skip.outputs.should_skip != 'true'
         run: |
-          set -eo pipefail
-          if ! mv "${GITHUB_WORKSPACE}"/cloudberry-devops-release 
"${GITHUB_WORKSPACE}"/..; then
-            echo "::error::Container initialization failed"
+          # Copy devops directory from main branch checkout
+          if [ -d "main-devops/devops" ]; then
+            cp -r main-devops/devops ./
+            chmod +x devops/build/automation/cloudberry/scripts/*.sh
+            chmod +x devops/build/packaging/rpm/*.sh
+            chmod +x devops/build/packaging/deb/*.sh
+            echo "DevOps scripts copied from main branch"
+          else
+            echo "::error::DevOps directory not found in main branch"
             exit 1
           fi
+          # Clean up temporary directory
+          rm -rf main-devops
+
+      - name: Install ICU Development Libraries
+        if: needs.check-skip.outputs.should_skip != 'true'
+        run: |
+          set -eo pipefail
+          
+          echo "Installing ICU development libraries..."
+          sudo dnf install -y libicu-devel
+          
+          echo "ICU libraries installed successfully"
+          rpm -qa | grep libicu
 
       - name: Cloudberry Environment Initialization
         if: needs.check-skip.outputs.should_skip != 'true'
@@ -506,8 +577,8 @@ jobs:
           SRC_DIR: ${{ github.workspace }}
         run: |
           set -eo pipefail
-          chmod +x 
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/configure-cloudberry.sh
-          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
ENABLE_DEBUG=${{ env.ENABLE_DEBUG }} 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/configure-cloudberry.sh";
 then
+          chmod +x 
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh
+          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
ENABLE_DEBUG=${{ env.ENABLE_DEBUG }} 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh"; 
then
             echo "::error::Configure script failed"
             exit 1
           fi
@@ -519,8 +590,8 @@ jobs:
         run: |
           set -eo pipefail
 
-          chmod +x 
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/build-cloudberry.sh
-          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/build-cloudberry.sh";
 then
+          chmod +x 
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/build-cloudberry.sh
+          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/build-cloudberry.sh"; then
             echo "::error::Build script failed"
             exit 1
           fi
@@ -602,7 +673,7 @@ jobs:
             # Create RPM
             echo "Creating RPM package..."
             rpmdev-setuptree
-            ln -s 
"${SRC_DIR}"/../cloudberry-devops-release/packaging/rpm/el/SPECS/apache-cloudberry-db-incubating.spec
 "${HOME}"/rpmbuild/SPECS/apache-cloudberry-db-incubating.spec
+            ln -s 
"${SRC_DIR}"/devops/build/packaging/rpm/apache-cloudberry-db-incubating.spec 
"${HOME}"/rpmbuild/SPECS/apache-cloudberry-db-incubating.spec
             cp "${SRC_DIR}"/LICENSE /usr/local/cloudberry-db
 
             DEBUG_RPMBUILD_OPT=""
@@ -612,7 +683,7 @@ jobs:
                DEBUG_IDENTIFIER=".debug"
             fi
 
-            "${SRC_DIR}"/../cloudberry-devops-release/scripts/build-rpm.sh 
--version "${CBDB_VERSION}" --release "${BUILD_NUMBER}" "${DEBUG_RPMBUILD_OPT}"
+            "${SRC_DIR}"/devops/build/packaging/rpm/build-rpm.sh --version 
"${CBDB_VERSION}" --release "${BUILD_NUMBER}" "${DEBUG_RPMBUILD_OPT}"
 
             # Get OS version and move RPM
             os_version=$(grep -oP '(?<=^VERSION_ID=")[0-9]' /etc/os-release)
@@ -649,8 +720,8 @@ jobs:
           SRC_DIR: ${{ github.workspace }}
         run: |
           set -eo pipefail
-          chmod +x 
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/unittest-cloudberry.sh
-          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/unittest-cloudberry.sh";
 then
+          chmod +x 
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/unittest-cloudberry.sh
+          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/unittest-cloudberry.sh"; 
then
             echo "::error::Unittest script failed"
             exit 1
           fi
@@ -667,7 +738,7 @@ jobs:
         if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/upload-artifact@v4
         with:
-          name: build-logs-${{ env.BUILD_TIMESTAMP }}
+          name: build-logs-rocky8-${{ env.BUILD_TIMESTAMP }}
           path: |
             build-logs/
           retention-days: ${{ env.LOG_RETENTION_DAYS }}
@@ -676,7 +747,7 @@ jobs:
         if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/upload-artifact@v4
         with:
-          name: apache-cloudberry-db-incubating-rpm-build-artifacts
+          name: apache-cloudberry-db-incubating-rpm-build-artifacts-rocky8
           retention-days: ${{ env.LOG_RETENTION_DAYS }}
           if-no-files-found: error
           path: |
@@ -686,7 +757,7 @@ jobs:
         if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/upload-artifact@v4
         with:
-          name: apache-cloudberry-db-incubating-source-build-artifacts
+          name: apache-cloudberry-db-incubating-source-build-artifacts-rocky8
           retention-days: ${{ env.LOG_RETENTION_DAYS }}
           if-no-files-found: error
           path: |
@@ -697,18 +768,47 @@ jobs:
   ## ======================================================================
 
   rpm-install-test:
-    name: RPM Install Test Apache Cloudberry
+    name: RPM Install Test Apache Cloudberry (Rocky 8)
     needs: [check-skip, build]
+    if: |
+      !cancelled() &&
+      (needs.build.result == 'success' || needs.build.result == 'skipped') &&
+      github.event.inputs.reuse_artifacts_from_run_id == ''
     runs-on: ubuntu-22.04
     timeout-minutes: 120
 
     container:
-      image: apache/incubator-cloudberry:cbdb-test-rocky9-latest
+      image: apache/incubator-cloudberry:cbdb-test-rocky8-latest
       options: >-
         --user root
         -h cdw
+        -v /usr/share:/host_usr_share
+        -v /usr/local:/host_usr_local
+        -v /opt:/host_opt
 
     steps:
+      - name: Free Disk Space
+        if: needs.check-skip.outputs.should_skip != 'true'
+        run: |
+          echo "=== Disk space before cleanup ==="
+          df -h /
+
+          # Remove pre-installed tools from host to free disk space
+          rm -rf /host_opt/hostedtoolcache || true   # GitHub Actions tool 
cache
+          rm -rf /host_usr_local/lib/android || true # Android SDK
+          rm -rf /host_usr_share/dotnet || true      # .NET SDK
+          rm -rf /host_opt/ghc || true               # Haskell GHC
+          rm -rf /host_usr_local/.ghcup || true      # Haskell GHCup
+          rm -rf /host_usr_share/swift || true       # Swift
+          rm -rf /host_usr_local/share/powershell || true  # PowerShell
+          rm -rf /host_usr_local/share/chromium || true    # Chromium
+          rm -rf /host_usr_share/miniconda || true   # Miniconda
+          rm -rf /host_opt/az || true                # Azure CLI
+          rm -rf /host_usr_share/sbt || true         # Scala Build Tool
+
+          echo "=== Disk space after cleanup ==="
+          df -h /
+
       - name: Skip Check
         if: needs.check-skip.outputs.should_skip == 'true'
         run: |
@@ -719,9 +819,11 @@ jobs:
         if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/download-artifact@v4
         with:
-          name: apache-cloudberry-db-incubating-rpm-build-artifacts
+          name: apache-cloudberry-db-incubating-rpm-build-artifacts-rocky8
           path: ${{ github.workspace }}/rpm_build_artifacts
           merge-multiple: false
+          run-id: ${{ github.event.inputs.reuse_artifacts_from_run_id || 
github.run_id }}
+          github-token: ${{ secrets.GITHUB_TOKEN }}
 
       - name: Cloudberry Environment Initialization
         if: needs.check-skip.outputs.should_skip != 'true'
@@ -826,12 +928,18 @@ jobs:
             echo "Version: ${RPM_VERSION}"
             echo "Release: ${RPM_RELEASE}"
 
+            # Refresh repository metadata to avoid mirror issues
+            echo "Refreshing repository metadata..."
+            dnf clean all
+            dnf makecache --refresh || dnf makecache
+
             # Clean install location
             rm -rf /usr/local/cloudberry-db
 
-            # Install RPM
+            # Install RPM with retry logic for mirror issues
+            # Use --releasever=8 to pin to stable Rocky Linux 8 repos (not 
bleeding-edge 8.10)
             echo "Starting installation..."
-            if ! time dnf install -y "${RPM_FILE}"; then
+            if ! time dnf install -y --setopt=retries=10 --releasever=8 
"${RPM_FILE}"; then
               echo "::error::RPM installation failed"
               exit 1
             fi
@@ -846,7 +954,7 @@ jobs:
         if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/upload-artifact@v4
         with:
-          name: install-logs-${{ needs.build.outputs.build_timestamp }}
+          name: install-logs-rocky8-${{ needs.build.outputs.build_timestamp }}
           path: |
             install-logs/
           retention-days: ${{ env.LOG_RETENTION_DAYS }}
@@ -868,8 +976,11 @@ jobs:
   ## ======================================================================
 
   test:
-    name: ${{ matrix.test }}
+    name: ${{ matrix.test }} (Rocky 8)
     needs: [check-skip, build, prepare-test-matrix]
+    if: |
+      !cancelled() &&
+      (needs.build.result == 'success' || needs.build.result == 'skipped')
     runs-on: ubuntu-22.04
     timeout-minutes: 120
     # actionlint-allow matrix[*].pg_settings
@@ -878,7 +989,7 @@ jobs:
       matrix: ${{ fromJson(needs.prepare-test-matrix.outputs.test-matrix) }}
 
     container:
-      image: apache/incubator-cloudberry:cbdb-build-rocky9-latest
+      image: apache/incubator-cloudberry:cbdb-build-rocky8-latest
       options: >-
         --privileged
         --user root
@@ -887,8 +998,33 @@ jobs:
         --ulimit core=-1
         --cgroupns=host
         -v /sys/fs/cgroup:/sys/fs/cgroup:rw
+        -v /usr/share:/host_usr_share
+        -v /usr/local:/host_usr_local
+        -v /opt:/host_opt
 
     steps:
+      - name: Free Disk Space
+        if: needs.check-skip.outputs.should_skip != 'true'
+        run: |
+          echo "=== Disk space before cleanup ==="
+          df -h /
+
+          # Remove pre-installed tools from host to free disk space
+          rm -rf /host_opt/hostedtoolcache || true   # GitHub Actions tool 
cache
+          rm -rf /host_usr_local/lib/android || true # Android SDK
+          rm -rf /host_usr_share/dotnet || true      # .NET SDK
+          rm -rf /host_opt/ghc || true               # Haskell GHC
+          rm -rf /host_usr_local/.ghcup || true      # Haskell GHCup
+          rm -rf /host_usr_share/swift || true       # Swift
+          rm -rf /host_usr_local/share/powershell || true  # PowerShell
+          rm -rf /host_usr_local/share/chromium || true    # Chromium
+          rm -rf /host_usr_share/miniconda || true   # Miniconda
+          rm -rf /host_opt/az || true                # Azure CLI
+          rm -rf /host_usr_share/sbt || true         # Scala Build Tool
+
+          echo "=== Disk space after cleanup ==="
+          df -h /
+
       - name: Skip Check
         if: needs.check-skip.outputs.should_skip == 'true'
         run: |
@@ -900,24 +1036,6 @@ jobs:
         run: |
           echo "Timestamp from output: ${{ needs.build.outputs.build_timestamp 
}}"
 
-      - name: Checkout CI Build/Test Scripts
-        if: needs.check-skip.outputs.should_skip != 'true'
-        uses: actions/checkout@v4
-        with:
-          repository: apache/cloudberry-devops-release
-          ref: main
-          path: cloudberry-devops-release
-          fetch-depth: 1
-
-      - name: Move cloudberry-devops-release directory
-        if: needs.check-skip.outputs.should_skip != 'true'
-        run: |
-          set -eo pipefail
-          if ! mv "${GITHUB_WORKSPACE}"/cloudberry-devops-release 
"${GITHUB_WORKSPACE}"/..; then
-            echo "::error::Container initialization failed"
-            exit 1
-          fi
-
       - name: Cloudberry Environment Initialization
         env:
           LOGS_DIR: build-logs
@@ -1098,7 +1216,7 @@ jobs:
         if: always()
         run: |
           {
-            echo "# Test Job Summary: ${{ matrix.test }}"
+            echo "# Test Job Summary: ${{ matrix.test }} (Rocky 8)"
             echo "## Environment"
             echo "- Start Time: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
 
@@ -1114,17 +1232,21 @@ jobs:
         if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/download-artifact@v4
         with:
-          name: apache-cloudberry-db-incubating-rpm-build-artifacts
+          name: apache-cloudberry-db-incubating-rpm-build-artifacts-rocky8
           path: ${{ github.workspace }}/rpm_build_artifacts
           merge-multiple: false
+          run-id: ${{ github.event.inputs.reuse_artifacts_from_run_id || 
github.run_id }}
+          github-token: ${{ secrets.GITHUB_TOKEN }}
 
       - name: Download Cloudberry Source build artifacts
         if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/download-artifact@v4
         with:
-          name: apache-cloudberry-db-incubating-source-build-artifacts
+          name: apache-cloudberry-db-incubating-source-build-artifacts-rocky8
           path: ${{ github.workspace }}/source_build_artifacts
           merge-multiple: false
+          run-id: ${{ github.event.inputs.reuse_artifacts_from_run_id || 
github.run_id }}
+          github-token: ${{ secrets.GITHUB_TOKEN }}
 
       - name: Verify downloaded artifacts
         if: needs.check-skip.outputs.should_skip != 'true'
@@ -1216,12 +1338,18 @@ jobs:
             echo "Version: ${RPM_VERSION}"
             echo "Release: ${RPM_RELEASE}"
 
+            # Refresh repository metadata to avoid mirror issues
+            echo "Refreshing repository metadata..."
+            dnf clean all
+            dnf makecache --refresh || dnf makecache
+
             # Clean install location
             rm -rf /usr/local/cloudberry-db
 
-            # Install RPM
+            # Install RPM with retry logic for mirror issues
+            # Use --releasever=8 to pin to stable Rocky Linux 8 repos (not 
bleeding-edge 8.10)
             echo "Starting installation..."
-            if ! time dnf install -y "${RPM_FILE}"; then
+            if ! time dnf install -y --setopt=retries=10 --releasever=8 
"${RPM_FILE}"; then
               echo "::error::RPM installation failed"
               exit 1
             fi
@@ -1230,6 +1358,22 @@ jobs:
             rpm -qi apache-cloudberry-db-incubating
           } 2>&1 | tee -a build-logs/details/rpm-installation.log
 
+          # Clean up downloaded RPM artifacts to free disk space
+          echo "=== Disk space before RPM cleanup ==="
+          echo "Human readable:"
+          df -kh /
+          echo "Exact KB:"
+          df -k /
+          echo "RPM artifacts size:"
+          du -sh "${GITHUB_WORKSPACE}"/rpm_build_artifacts || true
+          echo "Cleaning up RPM artifacts to free disk space..."
+          rm -rf "${GITHUB_WORKSPACE}"/rpm_build_artifacts
+          echo "=== Disk space after RPM cleanup ==="
+          echo "Human readable:"
+          df -kh /
+          echo "Exact KB:"
+          df -k /
+
       - name: Extract source tarball
         if: success() && needs.check-skip.outputs.should_skip != 'true'
         env:
@@ -1255,6 +1399,22 @@ jobs:
             du -sh "${SRC_DIR}/../cloudberry"
           } 2>&1 | tee -a build-logs/details/source-extraction.log
 
+          # Clean up source tarball to free disk space
+          echo "=== Disk space before source tarball cleanup ==="
+          echo "Human readable:"
+          df -kh /
+          echo "Exact KB:"
+          df -k /
+          echo "Source tarball artifacts size:"
+          du -sh "${GITHUB_WORKSPACE}"/source_build_artifacts || true
+          echo "Cleaning up source tarball to free disk space..."
+          rm -rf "${GITHUB_WORKSPACE}"/source_build_artifacts
+          echo "=== Disk space after source tarball cleanup ==="
+          echo "Human readable:"
+          df -kh /
+          echo "Exact KB:"
+          df -k /
+
       - name: Create Apache Cloudberry demo cluster
         if: success() && needs.check-skip.outputs.should_skip != 'true'
         env:
@@ -1263,8 +1423,8 @@ jobs:
           set -eo pipefail
 
           {
-            chmod +x 
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh
-            if ! time su - gpadmin -c "cd ${SRC_DIR} && 
NUM_PRIMARY_MIRROR_PAIRS='${{ matrix.num_primary_mirror_pairs }}' 
SRC_DIR=${SRC_DIR} 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh";
 then
+            chmod +x 
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh
+            if ! time su - gpadmin -c "cd ${SRC_DIR} && 
NUM_PRIMARY_MIRROR_PAIRS='${{ matrix.num_primary_mirror_pairs }}' 
SRC_DIR=${SRC_DIR} 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh";
 then
               echo "::error::Demo cluster creation failed"
               exit 1
             fi
@@ -1339,7 +1499,7 @@ jobs:
                  MAKE_DIRECTORY='-C $dir' \
                  PGOPTIONS='${PG_OPTS}' \
                  SRC_DIR='${SRC_DIR}' \
-                 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/test-cloudberry.sh"
 \
+                 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/test-cloudberry.sh" \
                  2>&1 | tee "$config_log"; then
               echo "::warning::Test execution failed for configuration 
$((i+1)): make -C $dir $target"
               overall_status=1
@@ -1372,7 +1532,7 @@ jobs:
             ls -Rl "/tmp/cloudberry-cores"
             echo "-----------------------------------------"
 
-            
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/analyze_core_dumps.sh
 "$test_id"
+            
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/analyze_core_dumps.sh 
"$test_id"
             core_analysis_rc=$?
             case "$core_analysis_rc" in
               0) echo "No core dumps found for this configuration" ;;
@@ -1448,7 +1608,7 @@ jobs:
             # Parse this configuration's results
 
             MAKE_NAME="${{ matrix.test }}-config$i" \
-            
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/parse-test-results.sh
 "$config_log"
+            
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/parse-test-results.sh 
"$config_log"
             status_code=$?
 
             {
@@ -1691,7 +1851,7 @@ jobs:
         if: always()
         uses: actions/upload-artifact@v4
         with:
-          name: test-logs-${{ matrix.test }}-${{ 
needs.build.outputs.build_timestamp }}
+          name: test-logs-${{ matrix.test }}-rocky8-${{ 
needs.build.outputs.build_timestamp }}
           path: |
             build-logs/
           retention-days: ${{ env.LOG_RETENTION_DAYS }}
@@ -1700,7 +1860,7 @@ jobs:
         if: always()
         uses: actions/upload-artifact@v4
         with:
-          name: test-metadata-${{ matrix.test }}
+          name: test-metadata-${{ matrix.test }}-rocky8
           path: |
             test_results*.txt
           retention-days: ${{ env.LOG_RETENTION_DAYS }}
@@ -1708,7 +1868,7 @@ jobs:
       - name: Upload test results files
         uses: actions/upload-artifact@v4
         with:
-          name: results-${{ matrix.test }}-${{ 
needs.build.outputs.build_timestamp }}
+          name: results-${{ matrix.test }}-rocky8-${{ 
needs.build.outputs.build_timestamp }}
           path: |
             **/regression.out
             **/regression.diffs
@@ -1719,7 +1879,7 @@ jobs:
         if: failure() || cancelled()
         uses: actions/upload-artifact@v4
         with:
-          name: regression-logs-${{ matrix.test }}-${{ 
needs.build.outputs.build_timestamp }}
+          name: regression-logs-${{ matrix.test }}-rocky8-${{ 
needs.build.outputs.build_timestamp }}
           path: |
             **/regression.out
             **/regression.diffs
@@ -1739,7 +1899,7 @@ jobs:
   ## ======================================================================
 
   report:
-    name: Generate Apache Cloudberry Build Report
+    name: Generate Apache Cloudberry Build Report (Rocky 8)
     needs: [check-skip, build, prepare-test-matrix, rpm-install-test, test]
     if: always()
     runs-on: ubuntu-22.04
@@ -1747,7 +1907,7 @@ jobs:
       - name: Generate Final Report
         run: |
           {
-            echo "# Apache Cloudberry Build Pipeline Report"
+            echo "# Apache Cloudberry Build Pipeline Report (Rocky 8)"
 
             if [[ "${{ needs.check-skip.outputs.should_skip }}" == "true" ]]; 
then
               echo "## CI Skip Status"
diff --git a/.github/workflows/build-cloudberry.yml 
b/.github/workflows/build-cloudberry.yml
index a6e659596b5..6eec6a50c3c 100644
--- a/.github/workflows/build-cloudberry.yml
+++ b/.github/workflows/build-cloudberry.yml
@@ -102,9 +102,9 @@ name: Apache Cloudberry Build
 
 on:
   push:
-    branches: [main]
+    branches: [main, cbdb-postgres-merge]
   pull_request:
-    branches: [main]
+    branches: [main, cbdb-postgres-merge]
     types: [opened, synchronize, reopened, edited]
   workflow_dispatch:
     inputs:
@@ -113,6 +113,11 @@ on:
         required: false
         default: 'all'
         type: string
+      reuse_artifacts_from_run_id:
+        description: 'Reuse build artifacts from a previous run ID (leave 
empty to build fresh)'
+        required: false
+        default: ''
+        type: string
 
 concurrency:
   group: ${{ github.workflow }}-${{ github.ref }}
@@ -281,18 +286,25 @@ jobs:
               },
               {"test":"ic-contrib",
                "make_configs":["contrib/auto_explain:installcheck",
+                               "contrib/amcheck:installcheck",
                                "contrib/citext:installcheck",
                                "contrib/btree_gin:installcheck",
+                               "contrib/btree_gist:installcheck",
+                               "contrib/dblink:installcheck",
+                               "contrib/dict_int:installcheck",
+                               "contrib/dict_xsyn:installcheck",
+                               "contrib/extprotocol:installcheck",
                                "contrib/file_fdw:installcheck",
                                "contrib/formatter_fixedwidth:installcheck",
-                               "contrib/extprotocol:installcheck",
-                               "contrib/dblink:installcheck",
+                               "contrib/hstore:installcheck",
+                               "contrib/indexscan:installcheck",
                                "contrib/pg_trgm:installcheck",
                                "contrib/indexscan:installcheck",
-                               "contrib/hstore:installcheck",
                                "contrib/pgcrypto:installcheck",
+                               "contrib/pgstattuple:installcheck",
                                "contrib/tablefunc:installcheck",
                                "contrib/passwordcheck:installcheck",
+                               "contrib/pg_buffercache:installcheck",
                                "contrib/sslinfo:installcheck"]
               },
               {"test":"ic-gpcontrib",
@@ -309,12 +321,18 @@ jobs:
               {"test":"ic-isolation2",
                "make_configs":["src/test/isolation2:installcheck-isolation2"]
               },
+              {"test":"ic-isolation2-hot-standby",
+               "make_configs":["src/test/isolation2:installcheck-hot-standby"]
+              },
               {"test":"ic-isolation2-crash",
                
"make_configs":["src/test/isolation2:installcheck-isolation2-crash"],
                "enable_core_check":false
               },
               {"test":"ic-parallel-retrieve-cursor",
                
"make_configs":["src/test/isolation2:installcheck-parallel-retrieve-cursor"]
+              },
+              {"test":"ic-cbdb-parallel",
+               "make_configs":["src/test/regress:installcheck-cbdb-parallel"]
               }
             ]
           }'
@@ -406,6 +424,7 @@ jobs:
     needs: [check-skip]
     runs-on: ubuntu-22.04
     timeout-minutes: 120
+    if: github.event.inputs.reuse_artifacts_from_run_id == ''
     outputs:
       build_timestamp: ${{ steps.set_timestamp.outputs.timestamp }}
 
@@ -414,8 +433,33 @@ jobs:
       options: >-
         --user root
         -h cdw
+        -v /usr/share:/host_usr_share
+        -v /usr/local:/host_usr_local
+        -v /opt:/host_opt
 
     steps:
+      - name: Free Disk Space
+        if: needs.check-skip.outputs.should_skip != 'true'
+        run: |
+          echo "=== Disk space before cleanup ==="
+          df -h /
+
+          # Remove pre-installed tools from host to free disk space
+          rm -rf /host_opt/hostedtoolcache || true   # GitHub Actions tool 
cache
+          rm -rf /host_usr_local/lib/android || true # Android SDK
+          rm -rf /host_usr_share/dotnet || true      # .NET SDK
+          rm -rf /host_opt/ghc || true               # Haskell GHC
+          rm -rf /host_usr_local/.ghcup || true      # Haskell GHCup
+          rm -rf /host_usr_share/swift || true       # Swift
+          rm -rf /host_usr_local/share/powershell || true  # PowerShell
+          rm -rf /host_usr_local/share/chromium || true    # Chromium
+          rm -rf /host_usr_share/miniconda || true   # Miniconda
+          rm -rf /host_opt/az || true                # Azure CLI
+          rm -rf /host_usr_share/sbt || true         # Scala Build Tool
+
+          echo "=== Disk space after cleanup ==="
+          df -h /
+
       - name: Skip Check
         if: needs.check-skip.outputs.should_skip == 'true'
         run: |
@@ -437,23 +481,44 @@ jobs:
           fetch-depth: 1
           submodules: true
 
-      - name: Checkout CI Build/Test Scripts
+      - name: Checkout DevOps Scripts from Main Branch
         if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/checkout@v4
         with:
-          repository: apache/cloudberry-devops-release
+          repository: ${{ github.repository }}
           ref: main
-          path: cloudberry-devops-release
-          fetch-depth: 1
+          sparse-checkout: |
+            devops/
+          sparse-checkout-cone-mode: false
+          path: main-devops
 
-      - name: Move cloudberry-devops-release directory
+      - name: Setup DevOps Scripts
         if: needs.check-skip.outputs.should_skip != 'true'
         run: |
-          set -eo pipefail
-          if ! mv "${GITHUB_WORKSPACE}"/cloudberry-devops-release 
"${GITHUB_WORKSPACE}"/..; then
-            echo "::error::Container initialization failed"
+          # Copy devops directory from main branch checkout
+          if [ -d "main-devops/devops" ]; then
+            cp -r main-devops/devops ./
+            chmod +x devops/build/automation/cloudberry/scripts/*.sh
+            chmod +x devops/build/packaging/rpm/*.sh
+            chmod +x devops/build/packaging/deb/*.sh
+            echo "DevOps scripts copied from main branch"
+          else
+            echo "::error::DevOps directory not found in main branch"
             exit 1
           fi
+          # Clean up temporary directory
+          rm -rf main-devops
+
+      - name: Install ICU Development Libraries
+        if: needs.check-skip.outputs.should_skip != 'true'
+        run: |
+          set -eo pipefail
+          
+          echo "Installing ICU development libraries..."
+          sudo dnf install -y libicu-devel
+          
+          echo "ICU libraries installed successfully"
+          rpm -qa | grep libicu
 
       - name: Cloudberry Environment Initialization
         if: needs.check-skip.outputs.should_skip != 'true'
@@ -506,8 +571,8 @@ jobs:
           SRC_DIR: ${{ github.workspace }}
         run: |
           set -eo pipefail
-          chmod +x 
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/configure-cloudberry.sh
-          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
ENABLE_DEBUG=${{ env.ENABLE_DEBUG }} 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/configure-cloudberry.sh";
 then
+          chmod +x 
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh
+          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
ENABLE_DEBUG=${{ env.ENABLE_DEBUG }} 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh"; 
then
             echo "::error::Configure script failed"
             exit 1
           fi
@@ -519,8 +584,8 @@ jobs:
         run: |
           set -eo pipefail
 
-          chmod +x 
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/build-cloudberry.sh
-          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/build-cloudberry.sh";
 then
+          chmod +x 
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/build-cloudberry.sh
+          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/build-cloudberry.sh"; then
             echo "::error::Build script failed"
             exit 1
           fi
@@ -602,7 +667,7 @@ jobs:
             # Create RPM
             echo "Creating RPM package..."
             rpmdev-setuptree
-            ln -s 
"${SRC_DIR}"/../cloudberry-devops-release/packaging/rpm/el/SPECS/apache-cloudberry-db-incubating.spec
 "${HOME}"/rpmbuild/SPECS/apache-cloudberry-db-incubating.spec
+            ln -s 
"${SRC_DIR}"/devops/build/packaging/rpm/apache-cloudberry-db-incubating.spec 
"${HOME}"/rpmbuild/SPECS/apache-cloudberry-db-incubating.spec
             cp "${SRC_DIR}"/LICENSE /usr/local/cloudberry-db
 
             DEBUG_RPMBUILD_OPT=""
@@ -612,7 +677,7 @@ jobs:
                DEBUG_IDENTIFIER=".debug"
             fi
 
-            "${SRC_DIR}"/../cloudberry-devops-release/scripts/build-rpm.sh 
--version "${CBDB_VERSION}" --release "${BUILD_NUMBER}" "${DEBUG_RPMBUILD_OPT}"
+            "${SRC_DIR}"/devops/build/packaging/rpm/build-rpm.sh --version 
"${CBDB_VERSION}" --release "${BUILD_NUMBER}" "${DEBUG_RPMBUILD_OPT}"
 
             # Get OS version and move RPM
             os_version=$(grep -oP '(?<=^VERSION_ID=")[0-9]' /etc/os-release)
@@ -649,8 +714,8 @@ jobs:
           SRC_DIR: ${{ github.workspace }}
         run: |
           set -eo pipefail
-          chmod +x 
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/unittest-cloudberry.sh
-          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/unittest-cloudberry.sh";
 then
+          chmod +x 
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/unittest-cloudberry.sh
+          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/unittest-cloudberry.sh"; 
then
             echo "::error::Unittest script failed"
             exit 1
           fi
@@ -699,6 +764,10 @@ jobs:
   rpm-install-test:
     name: RPM Install Test Apache Cloudberry
     needs: [check-skip, build]
+    if: |
+      !cancelled() &&
+      (needs.build.result == 'success' || needs.build.result == 'skipped') &&
+      github.event.inputs.reuse_artifacts_from_run_id == ''
     runs-on: ubuntu-22.04
     timeout-minutes: 120
 
@@ -707,8 +776,33 @@ jobs:
       options: >-
         --user root
         -h cdw
+        -v /usr/share:/host_usr_share
+        -v /usr/local:/host_usr_local
+        -v /opt:/host_opt
 
     steps:
+      - name: Free Disk Space
+        if: needs.check-skip.outputs.should_skip != 'true'
+        run: |
+          echo "=== Disk space before cleanup ==="
+          df -h /
+
+          # Remove pre-installed tools from host to free disk space
+          rm -rf /host_opt/hostedtoolcache || true   # GitHub Actions tool 
cache
+          rm -rf /host_usr_local/lib/android || true # Android SDK
+          rm -rf /host_usr_share/dotnet || true      # .NET SDK
+          rm -rf /host_opt/ghc || true               # Haskell GHC
+          rm -rf /host_usr_local/.ghcup || true      # Haskell GHCup
+          rm -rf /host_usr_share/swift || true       # Swift
+          rm -rf /host_usr_local/share/powershell || true  # PowerShell
+          rm -rf /host_usr_local/share/chromium || true    # Chromium
+          rm -rf /host_usr_share/miniconda || true   # Miniconda
+          rm -rf /host_opt/az || true                # Azure CLI
+          rm -rf /host_usr_share/sbt || true         # Scala Build Tool
+
+          echo "=== Disk space after cleanup ==="
+          df -h /
+
       - name: Skip Check
         if: needs.check-skip.outputs.should_skip == 'true'
         run: |
@@ -722,6 +816,8 @@ jobs:
           name: apache-cloudberry-db-incubating-rpm-build-artifacts
           path: ${{ github.workspace }}/rpm_build_artifacts
           merge-multiple: false
+          run-id: ${{ github.event.inputs.reuse_artifacts_from_run_id || 
github.run_id }}
+          github-token: ${{ secrets.GITHUB_TOKEN }}
 
       - name: Cloudberry Environment Initialization
         if: needs.check-skip.outputs.should_skip != 'true'
@@ -826,12 +922,18 @@ jobs:
             echo "Version: ${RPM_VERSION}"
             echo "Release: ${RPM_RELEASE}"
 
+            # Refresh repository metadata to avoid mirror issues
+            echo "Refreshing repository metadata..."
+            dnf clean all
+            dnf makecache --refresh || dnf makecache
+
             # Clean install location
             rm -rf /usr/local/cloudberry-db
 
-            # Install RPM
+            # Install RPM with retry logic for mirror issues
+            # Use --releasever=9 to pin to stable Rocky Linux 9 repos (not 
bleeding-edge 9.6)
             echo "Starting installation..."
-            if ! time dnf install -y "${RPM_FILE}"; then
+            if ! time dnf install -y --setopt=retries=10 --releasever=9 
"${RPM_FILE}"; then
               echo "::error::RPM installation failed"
               exit 1
             fi
@@ -870,6 +972,9 @@ jobs:
   test:
     name: ${{ matrix.test }}
     needs: [check-skip, build, prepare-test-matrix]
+    if: |
+      !cancelled() &&
+      (needs.build.result == 'success' || needs.build.result == 'skipped')
     runs-on: ubuntu-22.04
     timeout-minutes: 120
     # actionlint-allow matrix[*].pg_settings
@@ -887,8 +992,33 @@ jobs:
         --ulimit core=-1
         --cgroupns=host
         -v /sys/fs/cgroup:/sys/fs/cgroup:rw
+        -v /usr/share:/host_usr_share
+        -v /usr/local:/host_usr_local
+        -v /opt:/host_opt
 
     steps:
+      - name: Free Disk Space
+        if: needs.check-skip.outputs.should_skip != 'true'
+        run: |
+          echo "=== Disk space before cleanup ==="
+          df -h /
+
+          # Remove pre-installed tools from host to free disk space
+          rm -rf /host_opt/hostedtoolcache || true   # GitHub Actions tool 
cache
+          rm -rf /host_usr_local/lib/android || true # Android SDK
+          rm -rf /host_usr_share/dotnet || true      # .NET SDK
+          rm -rf /host_opt/ghc || true               # Haskell GHC
+          rm -rf /host_usr_local/.ghcup || true      # Haskell GHCup
+          rm -rf /host_usr_share/swift || true       # Swift
+          rm -rf /host_usr_local/share/powershell || true  # PowerShell
+          rm -rf /host_usr_local/share/chromium || true    # Chromium
+          rm -rf /host_usr_share/miniconda || true   # Miniconda
+          rm -rf /host_opt/az || true                # Azure CLI
+          rm -rf /host_usr_share/sbt || true         # Scala Build Tool
+
+          echo "=== Disk space after cleanup ==="
+          df -h /
+
       - name: Skip Check
         if: needs.check-skip.outputs.should_skip == 'true'
         run: |
@@ -900,24 +1030,6 @@ jobs:
         run: |
           echo "Timestamp from output: ${{ needs.build.outputs.build_timestamp 
}}"
 
-      - name: Checkout CI Build/Test Scripts
-        if: needs.check-skip.outputs.should_skip != 'true'
-        uses: actions/checkout@v4
-        with:
-          repository: apache/cloudberry-devops-release
-          ref: main
-          path: cloudberry-devops-release
-          fetch-depth: 1
-
-      - name: Move cloudberry-devops-release directory
-        if: needs.check-skip.outputs.should_skip != 'true'
-        run: |
-          set -eo pipefail
-          if ! mv "${GITHUB_WORKSPACE}"/cloudberry-devops-release 
"${GITHUB_WORKSPACE}"/..; then
-            echo "::error::Container initialization failed"
-            exit 1
-          fi
-
       - name: Cloudberry Environment Initialization
         env:
           LOGS_DIR: build-logs
@@ -1117,6 +1229,8 @@ jobs:
           name: apache-cloudberry-db-incubating-rpm-build-artifacts
           path: ${{ github.workspace }}/rpm_build_artifacts
           merge-multiple: false
+          run-id: ${{ github.event.inputs.reuse_artifacts_from_run_id || 
github.run_id }}
+          github-token: ${{ secrets.GITHUB_TOKEN }}
 
       - name: Download Cloudberry Source build artifacts
         if: needs.check-skip.outputs.should_skip != 'true'
@@ -1125,6 +1239,8 @@ jobs:
           name: apache-cloudberry-db-incubating-source-build-artifacts
           path: ${{ github.workspace }}/source_build_artifacts
           merge-multiple: false
+          run-id: ${{ github.event.inputs.reuse_artifacts_from_run_id || 
github.run_id }}
+          github-token: ${{ secrets.GITHUB_TOKEN }}
 
       - name: Verify downloaded artifacts
         if: needs.check-skip.outputs.should_skip != 'true'
@@ -1216,12 +1332,18 @@ jobs:
             echo "Version: ${RPM_VERSION}"
             echo "Release: ${RPM_RELEASE}"
 
+            # Refresh repository metadata to avoid mirror issues
+            echo "Refreshing repository metadata..."
+            dnf clean all
+            dnf makecache --refresh || dnf makecache
+
             # Clean install location
             rm -rf /usr/local/cloudberry-db
 
-            # Install RPM
+            # Install RPM with retry logic for mirror issues
+            # Use --releasever=9 to pin to stable Rocky Linux 9 repos (not 
bleeding-edge 9.6)
             echo "Starting installation..."
-            if ! time dnf install -y "${RPM_FILE}"; then
+            if ! time dnf install -y --setopt=retries=10 --releasever=9 
"${RPM_FILE}"; then
               echo "::error::RPM installation failed"
               exit 1
             fi
@@ -1230,6 +1352,22 @@ jobs:
             rpm -qi apache-cloudberry-db-incubating
           } 2>&1 | tee -a build-logs/details/rpm-installation.log
 
+          # Clean up downloaded RPM artifacts to free disk space
+          echo "=== Disk space before RPM cleanup ==="
+          echo "Human readable:"
+          df -kh /
+          echo "Exact KB:"
+          df -k /
+          echo "RPM artifacts size:"
+          du -sh "${GITHUB_WORKSPACE}"/rpm_build_artifacts || true
+          echo "Cleaning up RPM artifacts to free disk space..."
+          rm -rf "${GITHUB_WORKSPACE}"/rpm_build_artifacts
+          echo "=== Disk space after RPM cleanup ==="
+          echo "Human readable:"
+          df -kh /
+          echo "Exact KB:"
+          df -k /
+
       - name: Extract source tarball
         if: success() && needs.check-skip.outputs.should_skip != 'true'
         env:
@@ -1255,6 +1393,22 @@ jobs:
             du -sh "${SRC_DIR}/../cloudberry"
           } 2>&1 | tee -a build-logs/details/source-extraction.log
 
+          # Clean up source tarball to free disk space
+          echo "=== Disk space before source tarball cleanup ==="
+          echo "Human readable:"
+          df -kh /
+          echo "Exact KB:"
+          df -k /
+          echo "Source tarball artifacts size:"
+          du -sh "${GITHUB_WORKSPACE}"/source_build_artifacts || true
+          echo "Cleaning up source tarball to free disk space..."
+          rm -rf "${GITHUB_WORKSPACE}"/source_build_artifacts
+          echo "=== Disk space after source tarball cleanup ==="
+          echo "Human readable:"
+          df -kh /
+          echo "Exact KB:"
+          df -k /
+
       - name: Create Apache Cloudberry demo cluster
         if: success() && needs.check-skip.outputs.should_skip != 'true'
         env:
@@ -1263,8 +1417,8 @@ jobs:
           set -eo pipefail
 
           {
-            chmod +x 
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh
-            if ! time su - gpadmin -c "cd ${SRC_DIR} && 
NUM_PRIMARY_MIRROR_PAIRS='${{ matrix.num_primary_mirror_pairs }}' 
SRC_DIR=${SRC_DIR} 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh";
 then
+            chmod +x 
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh
+            if ! time su - gpadmin -c "cd ${SRC_DIR} && 
NUM_PRIMARY_MIRROR_PAIRS='${{ matrix.num_primary_mirror_pairs }}' 
SRC_DIR=${SRC_DIR} 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh";
 then
               echo "::error::Demo cluster creation failed"
               exit 1
             fi
@@ -1339,7 +1493,7 @@ jobs:
                  MAKE_DIRECTORY='-C $dir' \
                  PGOPTIONS='${PG_OPTS}' \
                  SRC_DIR='${SRC_DIR}' \
-                 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/test-cloudberry.sh"
 \
+                 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/test-cloudberry.sh" \
                  2>&1 | tee "$config_log"; then
               echo "::warning::Test execution failed for configuration 
$((i+1)): make -C $dir $target"
               overall_status=1
@@ -1372,7 +1526,7 @@ jobs:
             ls -Rl "/tmp/cloudberry-cores"
             echo "-----------------------------------------"
 
-            
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/analyze_core_dumps.sh
 "$test_id"
+            
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/analyze_core_dumps.sh 
"$test_id"
             core_analysis_rc=$?
             case "$core_analysis_rc" in
               0) echo "No core dumps found for this configuration" ;;
@@ -1448,7 +1602,7 @@ jobs:
             # Parse this configuration's results
 
             MAKE_NAME="${{ matrix.test }}-config$i" \
-            
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/parse-test-results.sh
 "$config_log"
+            
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/parse-test-results.sh 
"$config_log"
             status_code=$?
 
             {
diff --git a/.github/workflows/build-cloudberry.yml 
b/.github/workflows/build-deb-cloudberry.yml
similarity index 72%
copy from .github/workflows/build-cloudberry.yml
copy to .github/workflows/build-deb-cloudberry.yml
index a6e659596b5..ea1a502e77a 100644
--- a/.github/workflows/build-cloudberry.yml
+++ b/.github/workflows/build-deb-cloudberry.yml
@@ -22,52 +22,29 @@
 # Description:
 #
 #   This workflow builds, tests, and packages Apache Cloudberry on
-#   Rocky Linux 9. It ensures artifact integrity, performs installation
-#   tests, validates key operations, and provides detailed test reports,
-#   including handling for ignored test cases.
+#   Ubuntu 22.04. It ensures artifact integrity and performs installation
+#   tests.
 #
 # Workflow Overview:
-# 1. **Check Skip**:
-#    - Dynamically determines if the workflow should run based on CI skip 
flags.
-#    - Evaluates the following fields for skip flags:
-#      - **Pull Request Events**: PR title and PR body.
-#      - **Push Events**: Commit message of the head commit.
-#    - Supports the following skip patterns (case-insensitive):
-#      - `[skip ci]`
-#      - `[ci skip]`
-#      - `[no ci]`
-#    - **Example Usage**:
-#      - Add `[skip ci]` to a commit message, PR title, or body to skip the 
workflow.
-#
-# 2. **Build Job**:
+# 1. **Build Job**:
 #    - Configures and builds Apache Cloudberry.
 #    - Supports debug build configuration via ENABLE_DEBUG flag.
 #    - Runs unit tests and verifies build artifacts.
-#    - Creates RPM packages (regular or debug), source tarballs, and logs.
-#    - **Key Artifacts**: RPM package, source tarball, build logs.
+#    - Creates DEB packages (regular and debug), source tarball
+#    and additional files for dupload utility.
+#    - **Key Artifacts**: DEB package, source tarball, changes and dsc files, 
build logs.
 #
-# 3. **RPM Install Test Job**:
-#    - Verifies RPM integrity and installs Cloudberry.
+# 2. **DEB Install Test Job**:
+#    - Verifies DEB integrity and installs Cloudberry.
 #    - Validates successful installation.
 #    - **Key Artifacts**: Installation logs, verification results.
 #
-# 4. **Test Job (Matrix)**:
-#    - Executes a test matrix to validate different scenarios.
-#    - Creates a demo cluster and runs installcheck tests.
-#    - Parses and reports test results, including failed and ignored tests.
-#    - Detects and analyzes any core dumps generated during tests.
-#    - **Key Features**:
-#      - Regression diffs are displayed if found, aiding quick debugging.
-#      - Both failed and ignored test names are logged and reported.
-#      - Core dumps are analyzed using GDB for stack traces.
-#    - **Key Artifacts**: Test logs, regression files, test summaries, core 
analyses.
-#
-# 5. **Report Job**:
+# 3. **Report Job**:
 #    - Aggregates job results into a final report.
 #    - Sends failure notifications if any step fails.
 #
 # Execution Environment:
-# - **Runs On**: ubuntu-22.04 with Rocky Linux 9 containers.
+# - **Runs On**: ubuntu-22.04 with ubuntu-22.04 containers.
 # - **Resource Requirements**:
 #   - Disk: Minimum 20GB free space.
 #   - Memory: Minimum 8GB RAM.
@@ -79,44 +56,40 @@
 # - Manual workflow dispatch.
 #
 # Container Images:
-# - **Build**: `apache/incubator-cloudberry:cbdb-build-rocky9-latest`
-# - **Test**: `apache/incubator-cloudberry:cbdb-test-rocky9-latest`
+# - **Build**: `apache/incubator-cloudberry:cbdb-build-ubuntu22.04-latest`
+# - **Test**: `apache/incubator-cloudberry:cbdb-test-ubuntu22.04-latest`
 #
 # Artifacts:
-# - RPM Package          (retention: ${{ env.LOG_RETENTION_DAYS }} days).
-# - Source Tarball       (retention: ${{ env.LOG_RETENTION_DAYS }} days).
+# - DEB Package           (retention: ${{ env.LOG_RETENTION_DAYS }} days).
+# - Changes and DSC files (retention: ${{ env.LOG_RETENTION_DAYS }} days).
+# - Source Tarball        (retention: ${{ env.LOG_RETENTION_DAYS }} days).
 # - Logs and Test Results (retention: ${{ env.LOG_RETENTION_DAYS }} days).
-# - Regression Diffs      (retention: ${{ env.LOG_RETENTION_DAYS }} days).
-# - Core Dump Analyses    (retention: ${{ env.LOG_RETENTION_DAYS }} days).
 #
 # Notes:
 # - Supports concurrent job execution.
-# - Includes robust skip logic for pull requests and pushes.
-# - Handles ignored test cases, ensuring results are comprehensive.
-# - Provides detailed logs and error handling for failed and ignored tests.
-# - Analyzes core dumps generated during test execution.
 # - Supports debug builds with preserved symbols.
 # --------------------------------------------------------------------
 
-name: Apache Cloudberry Build
+name: Apache Cloudberry Debian Build
 
 on:
   push:
-    branches: [main]
+    branches: [main, cbdb-postgres-merge]
   pull_request:
-    branches: [main]
+    branches: [main, cbdb-postgres-merge]
     types: [opened, synchronize, reopened, edited]
-  workflow_dispatch:
+  workflow_dispatch:  # Manual trigger
     inputs:
       test_selection:
         description: 'Select tests to run (comma-separated). Examples: 
ic-good-opt-off,ic-contrib'
         required: false
         default: 'all'
         type: string
-
-concurrency:
-  group: ${{ github.workflow }}-${{ github.ref }}
-  cancel-in-progress: false
+      reuse_artifacts_from_run_id:
+        description: 'Reuse build artifacts from a previous run ID (leave 
empty to build fresh)'
+        required: false
+        default: ''
+        type: string
 
 # Note: Step details, logs, and artifacts require users to be logged into 
GitHub
 # even for public repositories. This is a GitHub security feature and cannot
@@ -196,10 +169,10 @@ jobs:
           exit 0
 
   ## ======================================================================
-  ## Job: prepare-test-matrix
+  ## Job: prepare-test-matrix-deb
   ## ======================================================================
 
-  prepare-test-matrix:
+  prepare-test-matrix-deb:
     runs-on: ubuntu-22.04
     needs: [check-skip]
     if: needs.check-skip.outputs.should_skip != 'true'
@@ -222,15 +195,15 @@ jobs:
           # Define base test configurations
           ALL_TESTS='{
             "include": [
-              {"test":"ic-good-opt-off",
+              {"test":"ic-deb-good-opt-off",
                "make_configs":["src/test/regress:installcheck-good"],
                "pg_settings":{"optimizer":"off"}
               },
-              {"test":"ic-good-opt-on",
+              {"test":"ic-deb-good-opt-on",
                "make_configs":["src/test/regress:installcheck-good"],
                "pg_settings":{"optimizer":"on"}
               },
-              {"test":"pax-ic-good-opt-off",
+              {"test":"pax-ic-deb-good-opt-off",
                "make_configs":[
                 "contrib/pax_storage/:pax-test",
                 "contrib/pax_storage/:regress_test"
@@ -240,7 +213,7 @@ jobs:
                  "default_table_access_method":"pax"
                 }
               },
-              {"test":"pax-ic-good-opt-on",
+              {"test":"pax-ic-deb-good-opt-on",
                "make_configs":[
                 "contrib/pax_storage/:pax-test",
                 "contrib/pax_storage/:regress_test"
@@ -250,71 +223,38 @@ jobs:
                  "default_table_access_method":"pax"
                 }
               },
-              {"test":"pax-ic-isolation2-opt-off",
-               "make_configs":["contrib/pax_storage/:isolation2_test"],
-               "pg_settings":{
-                 "optimizer":"off",
-                 "default_table_access_method":"pax"
-                },
-                "enable_core_check":false
-              },
-              {"test":"pax-ic-isolation2-opt-on",
-               "make_configs":["contrib/pax_storage/:isolation2_test"],
-               "pg_settings":{
-                 "optimizer":"on",
-                 "default_table_access_method":"pax"
-                },
-                "enable_core_check":false
-              },
-              {"test":"ic-expandshrink",
-               "make_configs":["src/test/isolation2:installcheck-expandshrink"]
-              },
-              {"test":"ic-singlenode",
-               "make_configs":["src/test/isolation:installcheck-singlenode",
-                               
"src/test/singlenode_regress:installcheck-singlenode",
-                               
"src/test/singlenode_isolation2:installcheck-singlenode"],
-               "num_primary_mirror_pairs":0
-              },
-              {"test":"ic-resgroup-v2",
-               "make_configs":["src/test/isolation2:installcheck-resgroup-v2"],
-               "enable_cgroups":true
-              },
-              {"test":"ic-contrib",
+              {"test":"ic-deb-contrib",
                "make_configs":["contrib/auto_explain:installcheck",
+                               "contrib/amcheck:installcheck",
                                "contrib/citext:installcheck",
                                "contrib/btree_gin:installcheck",
+                               "contrib/btree_gist:installcheck",
+                               "contrib/dblink:installcheck",
+                               "contrib/dict_int:installcheck",
+                               "contrib/dict_xsyn:installcheck",
+                               "contrib/extprotocol:installcheck",
                                "contrib/file_fdw:installcheck",
                                "contrib/formatter_fixedwidth:installcheck",
-                               "contrib/extprotocol:installcheck",
-                               "contrib/dblink:installcheck",
+                               "contrib/hstore:installcheck",
+                               "contrib/indexscan:installcheck",
                                "contrib/pg_trgm:installcheck",
                                "contrib/indexscan:installcheck",
-                               "contrib/hstore:installcheck",
                                "contrib/pgcrypto:installcheck",
+                               "contrib/pgstattuple:installcheck",
                                "contrib/tablefunc:installcheck",
                                "contrib/passwordcheck:installcheck",
+                               "contrib/pg_buffercache:installcheck",
                                "contrib/sslinfo:installcheck"]
               },
-              {"test":"ic-gpcontrib",
+              {"test":"ic-deb-gpcontrib",
                "make_configs":["gpcontrib/orafce:installcheck",
                                "gpcontrib/pxf_fdw:installcheck",
                                "gpcontrib/zstd:installcheck",
                                "gpcontrib/gp_sparse_vector:installcheck",
                                "gpcontrib/gp_toolkit:installcheck"]
               },
-              {"test":"ic-fixme",
-               "make_configs":["src/test/regress:installcheck-fixme"],
-               "enable_core_check":false
-              },
-              {"test":"ic-isolation2",
-               "make_configs":["src/test/isolation2:installcheck-isolation2"]
-              },
-              {"test":"ic-isolation2-crash",
-               
"make_configs":["src/test/isolation2:installcheck-isolation2-crash"],
-               "enable_core_check":false
-              },
-              {"test":"ic-parallel-retrieve-cursor",
-               
"make_configs":["src/test/isolation2:installcheck-parallel-retrieve-cursor"]
+              {"test":"ic-cbdb-parallel",
+               "make_configs":["src/test/regress:installcheck-cbdb-parallel"]
               }
             ]
           }'
@@ -396,26 +336,52 @@ jobs:
           echo "=== Matrix Preparation Complete ==="
 
   ## ======================================================================
-  ## Job: build
+  ## Job: build-deb
   ## ======================================================================
 
-  build:
-    name: Build Apache Cloudberry RPM
+  build-deb:
+    name: Build Apache Cloudberry DEB
     env:
       JOB_TYPE: build
     needs: [check-skip]
     runs-on: ubuntu-22.04
     timeout-minutes: 120
+    if: github.event.inputs.reuse_artifacts_from_run_id == ''
     outputs:
       build_timestamp: ${{ steps.set_timestamp.outputs.timestamp }}
 
     container:
-      image: apache/incubator-cloudberry:cbdb-build-rocky9-latest
+      image: apache/incubator-cloudberry:cbdb-build-ubuntu22.04-latest
       options: >-
         --user root
         -h cdw
+        -v /usr/share:/host_usr_share
+        -v /usr/local:/host_usr_local
+        -v /opt:/host_opt
 
     steps:
+      - name: Free Disk Space
+        if: needs.check-skip.outputs.should_skip != 'true'
+        run: |
+          echo "=== Disk space before cleanup ==="
+          df -h /
+
+          # Remove pre-installed tools from host to free disk space
+          rm -rf /host_opt/hostedtoolcache || true   # GitHub Actions tool 
cache
+          rm -rf /host_usr_local/lib/android || true # Android SDK
+          rm -rf /host_usr_share/dotnet || true      # .NET SDK
+          rm -rf /host_opt/ghc || true               # Haskell GHC
+          rm -rf /host_usr_local/.ghcup || true      # Haskell GHCup
+          rm -rf /host_usr_share/swift || true       # Swift
+          rm -rf /host_usr_local/share/powershell || true  # PowerShell
+          rm -rf /host_usr_local/share/chromium || true    # Chromium
+          rm -rf /host_usr_share/miniconda || true   # Miniconda
+          rm -rf /host_opt/az || true                # Azure CLI
+          rm -rf /host_usr_share/sbt || true         # Scala Build Tool
+
+          echo "=== Disk space after cleanup ==="
+          df -h /
+
       - name: Skip Check
         if: needs.check-skip.outputs.should_skip == 'true'
         run: |
@@ -423,7 +389,6 @@ jobs:
           exit 0
 
       - name: Set build timestamp
-        if: needs.check-skip.outputs.should_skip != 'true'
         id: set_timestamp  # Add an ID to reference this step
         run: |
           timestamp=$(date +'%Y%m%d_%H%M%S')
@@ -431,32 +396,39 @@ jobs:
           echo "BUILD_TIMESTAMP=$timestamp" | tee -a "$GITHUB_ENV" # Also set 
as environment variable
 
       - name: Checkout Apache Cloudberry
-        if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/checkout@v4
         with:
           fetch-depth: 1
           submodules: true
 
-      - name: Checkout CI Build/Test Scripts
-        if: needs.check-skip.outputs.should_skip != 'true'
+      - name: Checkout DevOps Scripts from Main Branch
         uses: actions/checkout@v4
         with:
-          repository: apache/cloudberry-devops-release
+          repository: ${{ github.repository }}
           ref: main
-          path: cloudberry-devops-release
-          fetch-depth: 1
+          sparse-checkout: |
+            devops/
+          sparse-checkout-cone-mode: false
+          path: main-devops
 
-      - name: Move cloudberry-devops-release directory
-        if: needs.check-skip.outputs.should_skip != 'true'
+      - name: Setup DevOps Scripts
         run: |
-          set -eo pipefail
-          if ! mv "${GITHUB_WORKSPACE}"/cloudberry-devops-release 
"${GITHUB_WORKSPACE}"/..; then
-            echo "::error::Container initialization failed"
+          # Copy devops directory from main branch checkout
+          if [ -d "main-devops/devops" ]; then
+            cp -r main-devops/devops ./
+            chmod +x devops/build/automation/cloudberry/scripts/*.sh
+            chmod +x devops/build/packaging/rpm/*.sh
+            chmod +x devops/build/packaging/deb/*.sh
+            echo "DevOps scripts copied from main branch"
+          else
+            echo "::error::DevOps directory not found in main branch"
             exit 1
           fi
+          # Clean up temporary directory
+          rm -rf main-devops
 
       - name: Cloudberry Environment Initialization
-        if: needs.check-skip.outputs.should_skip != 'true'
+        shell: bash
         env:
           LOGS_DIR: build-logs
         run: |
@@ -489,61 +461,67 @@ jobs:
           echo "SRC_DIR=${GITHUB_WORKSPACE}" | tee -a "$GITHUB_ENV"
 
       - name: Generate Build Job Summary Start
-        if: needs.check-skip.outputs.should_skip != 'true'
         run: |
           {
             echo "# Build Job Summary"
             echo "## Environment"
             echo "- Start Time: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
             echo "- ENABLE_DEBUG: ${{ env.ENABLE_DEBUG }}"
-            echo "- OS Version: $(cat /etc/redhat-release)"
+            echo "- OS Version: $(lsb_release -sd)"
             echo "- GCC Version: $(gcc --version | head -n1)"
           } >> "$GITHUB_STEP_SUMMARY"
 
       - name: Run Apache Cloudberry configure script
-        if: needs.check-skip.outputs.should_skip != 'true'
+        shell: bash
         env:
           SRC_DIR: ${{ github.workspace }}
         run: |
           set -eo pipefail
-          chmod +x 
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/configure-cloudberry.sh
-          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
ENABLE_DEBUG=${{ env.ENABLE_DEBUG }} 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/configure-cloudberry.sh";
 then
+
+          export BUILD_DESTINATION=${SRC_DIR}/debian/build
+
+          chmod +x 
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh
+          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
ENABLE_DEBUG=${{ env.ENABLE_DEBUG }} BUILD_DESTINATION=${BUILD_DESTINATION} 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/configure-cloudberry.sh"; 
then
             echo "::error::Configure script failed"
             exit 1
           fi
 
       - name: Run Apache Cloudberry build script
-        if: needs.check-skip.outputs.should_skip != 'true'
+        shell: bash
         env:
           SRC_DIR: ${{ github.workspace }}
         run: |
           set -eo pipefail
 
-          chmod +x 
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/build-cloudberry.sh
-          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/build-cloudberry.sh";
 then
+          export BUILD_DESTINATION=${SRC_DIR}/debian/build
+
+          chmod +x 
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/build-cloudberry.sh
+          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
BUILD_DESTINATION=${BUILD_DESTINATION} 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/build-cloudberry.sh"; then
             echo "::error::Build script failed"
             exit 1
           fi
 
       - name: Verify build artifacts
-        if: needs.check-skip.outputs.should_skip != 'true'
+        shell: bash
         run: |
           set -eo pipefail
 
+          export BUILD_DESTINATION=${SRC_DIR}/debian/build
+
           echo "Verifying build artifacts..."
           {
             echo "=== Build Artifacts Verification ==="
             echo "Timestamp: $(date -u)"
 
-            if [ ! -d "/usr/local/cloudberry-db" ]; then
+            if [ ! -d "${BUILD_DESTINATION}" ]; then
               echo "::error::Build artifacts directory not found"
               exit 1
             fi
 
             # Verify critical binaries
             critical_binaries=(
-              "/usr/local/cloudberry-db/bin/postgres"
-              "/usr/local/cloudberry-db/bin/psql"
+              "${BUILD_DESTINATION}/bin/postgres"
+              "${BUILD_DESTINATION}/bin/psql"
             )
 
             echo "Checking critical binaries..."
@@ -562,11 +540,11 @@ jobs:
 
             # Test binary execution
             echo "Testing binary execution..."
-            if ! /usr/local/cloudberry-db/bin/postgres --version; then
+            if ! ${BUILD_DESTINATION}/bin/postgres --version; then
               echo "::error::postgres binary verification failed"
               exit 1
             fi
-            if ! /usr/local/cloudberry-db/bin/psql --version; then
+            if ! ${BUILD_DESTINATION}/bin/psql --version; then
               echo "::error::psql binary verification failed"
               exit 1
             fi
@@ -574,8 +552,8 @@ jobs:
             echo "All build artifacts verified successfully"
           } 2>&1 | tee -a build-logs/details/build-verification.log
 
-      - name: Create Source tarball, create RPM and verify artifacts
-        if: needs.check-skip.outputs.should_skip != 'true'
+      - name: Create Source tarball, create DEB and verify artifacts
+        shell: bash
         env:
           CBDB_VERSION: 99.0.0
           BUILD_NUMBER: 1
@@ -587,76 +565,82 @@ jobs:
             echo "=== Artifact Creation Log ==="
             echo "Timestamp: $(date -u)"
 
-            # Create source tarball
-            echo "Creating source tarball..."
-            tar czf "${SRC_DIR}"/../apache-cloudberry-incubating-src.tgz -C 
"${SRC_DIR}"/.. ./cloudberry
-            mv "${SRC_DIR}"/../apache-cloudberry-incubating-src.tgz 
"${SRC_DIR}"
+            cp -r "${SRC_DIR}"/devops/build/packaging/deb/ubuntu22.04/* debian/
+            chown -R "$(whoami)" debian
+            chmod -x debian/*install
 
-            # Verify tarball contents
-            echo "Verifying source tarball contents..."
-            if ! tar tzf "${SRC_DIR}"/apache-cloudberry-incubating-src.tgz > 
/dev/null; then
-              echo "::error::Source tarball verification failed"
-              exit 1
-            fi
+            # replace not supported symbols in version
+            CBDB_VERSION=$(echo "$CBDB_VERSION" | sed "s/\//./g")
+            CBDB_VERSION=$(echo "$CBDB_VERSION" | sed "s/_/-/g")
+          
+            echo "We will built ${CBDB_VERSION}"
+            export BUILD_DESTINATION=${SRC_DIR}/debian/build
 
-            # Create RPM
-            echo "Creating RPM package..."
-            rpmdev-setuptree
-            ln -s 
"${SRC_DIR}"/../cloudberry-devops-release/packaging/rpm/el/SPECS/apache-cloudberry-db-incubating.spec
 "${HOME}"/rpmbuild/SPECS/apache-cloudberry-db-incubating.spec
-            cp "${SRC_DIR}"/LICENSE /usr/local/cloudberry-db
-
-            DEBUG_RPMBUILD_OPT=""
-            DEBUG_IDENTIFIER=""
-            if [ "${{ env.ENABLE_DEBUG }}" = "true" ]; then
-               DEBUG_RPMBUILD_OPT="--with-debug"
-               DEBUG_IDENTIFIER=".debug"
+            if ! ${SRC_DIR}/devops/build/packaging/deb/build-deb.sh -v 
$CBDB_VERSION; then
+              echo "::error::Build script failed"
+              exit 1
             fi
 
-            "${SRC_DIR}"/../cloudberry-devops-release/scripts/build-rpm.sh 
--version "${CBDB_VERSION}" --release "${BUILD_NUMBER}" "${DEBUG_RPMBUILD_OPT}"
-
-            # Get OS version and move RPM
-            os_version=$(grep -oP '(?<=^VERSION_ID=")[0-9]' /etc/os-release)
-            
RPM_FILE="${HOME}"/rpmbuild/RPMS/x86_64/apache-cloudberry-db-incubating-"${CBDB_VERSION}"-"${BUILD_NUMBER}""${DEBUG_IDENTIFIER}".el"${os_version}".x86_64.rpm
-            cp "${RPM_FILE}" "${SRC_DIR}"
-            
RPM_DEBUG="${HOME}"/rpmbuild/RPMS/x86_64/apache-cloudberry-db-incubating-debuginfo-"${CBDB_VERSION}"-"${BUILD_NUMBER}""${DEBUG_IDENTIFIER}".el"${os_version}".x86_64.rpm
-            cp "${RPM_DEBUG}" "${SRC_DIR}"
+            ARCH="amd64"
+            CBDB_PKG_VERSION=${CBDB_VERSION}-${BUILD_NUMBER}-$(git 
--git-dir=.git rev-list HEAD --count).$(git --git-dir=.git rev-parse --short 
HEAD)
+
+            echo "Produced artifacts"
+            ls -l ../
+
+            echo "Copy artifacts to subdirectory for sign/upload"
+            mkdir ${SRC_DIR}/deb
+            
DEB_FILE="apache-cloudberry-db-incubating_${CBDB_PKG_VERSION}"_"${ARCH}".deb
+            
DBG_DEB_FILE="apache-cloudberry-db-incubating-dbgsym_${CBDB_PKG_VERSION}"_"${ARCH}".ddeb
+            
CHANGES_DEB_FILE="apache-cloudberry-db-incubating_${CBDB_PKG_VERSION}"_"${ARCH}".changes
+            
BUILDINFO_DEB_FILE="apache-cloudberry-db-incubating_${CBDB_PKG_VERSION}"_"${ARCH}".buildinfo
+            
DSC_DEB_FILE="apache-cloudberry-db-incubating_${CBDB_PKG_VERSION}".dsc
+            
SOURCE_FILE="apache-cloudberry-db-incubating_${CBDB_PKG_VERSION}".tar.xz
+            cp ../"${DEB_FILE}" "${SRC_DIR}/deb"
+            cp ../"${DBG_DEB_FILE}" "${SRC_DIR}/deb"
+            cp ../"${CHANGES_DEB_FILE}" "${SRC_DIR}/deb"
+            cp ../"${BUILDINFO_DEB_FILE}" "${SRC_DIR}/deb"
+            cp ../"${DSC_DEB_FILE}" "${SRC_DIR}/deb"
+            cp ../"${SOURCE_FILE}" "${SRC_DIR}/deb"
+            mkdir "${SRC_DIR}/deb/debian"
+            cp debian/changelog "${SRC_DIR}/deb/debian"
 
             # Get package information
             echo "Package Information:"
-            rpm -qip "${RPM_FILE}"
+            dpkg --info "${SRC_DIR}/deb/${DEB_FILE}"
+            dpkg --contents "${SRC_DIR}/deb/${DEB_FILE}"
 
-            # Verify critical files in RPM
-            echo "Verifying critical files in RPM..."
+            # Verify critical files in DEB
+            echo "Verifying critical files in DEB..."
             for binary in "bin/postgres" "bin/psql"; do
-              if ! rpm -qlp "${RPM_FILE}" | grep -q "${binary}$"; then
-                echo "::error::Critical binary '${binary}' not found in RPM"
+              if ! dpkg --contents "${SRC_DIR}/deb/${DEB_FILE}" | grep -c 
"${binary}$"; then
+                echo "::error::Critical binary '${binary}' not found in DEB"
                 exit 1
               fi
             done
 
             # Record checksums
             echo "Calculating checksums..."
-            sha256sum "${RPM_FILE}" | tee -a build-logs/details/checksums.log
-            sha256sum "${SRC_DIR}"/apache-cloudberry-incubating-src.tgz | tee 
-a build-logs/details/checksums.log
+            sha256sum "${SRC_DIR}/deb/${DEB_FILE}" | tee -a 
build-logs/details/checksums.log
 
             echo "Artifacts created and verified successfully"
 
+
           } 2>&1 | tee -a build-logs/details/artifact-creation.log
 
       - name: Run Apache Cloudberry unittest script
         if: needs.check-skip.outputs.should_skip != 'true'
+        shell: bash
         env:
           SRC_DIR: ${{ github.workspace }}
         run: |
           set -eo pipefail
-          chmod +x 
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/unittest-cloudberry.sh
-          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/unittest-cloudberry.sh";
 then
+          chmod +x 
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/unittest-cloudberry.sh
+          if ! time su - gpadmin -c "cd ${SRC_DIR} && SRC_DIR=${SRC_DIR} 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/unittest-cloudberry.sh"; 
then
             echo "::error::Unittest script failed"
             exit 1
           fi
 
       - name: Generate Build Job Summary End
-        if: always()
         run: |
           {
             echo "## Build Results"
@@ -664,7 +648,6 @@ jobs:
           } >> "$GITHUB_STEP_SUMMARY"
 
       - name: Upload build logs
-        if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/upload-artifact@v4
         with:
           name: build-logs-${{ env.BUILD_TIMESTAMP }}
@@ -672,59 +655,93 @@ jobs:
             build-logs/
           retention-days: ${{ env.LOG_RETENTION_DAYS }}
 
-      - name: Upload Cloudberry RPM build artifacts
-        if: needs.check-skip.outputs.should_skip != 'true'
+      - name: Upload Cloudberry DEB build artifacts
         uses: actions/upload-artifact@v4
         with:
-          name: apache-cloudberry-db-incubating-rpm-build-artifacts
+          name: apache-cloudberry-db-incubating-deb-build-artifacts
           retention-days: ${{ env.LOG_RETENTION_DAYS }}
           if-no-files-found: error
           path: |
-            *.rpm
+            deb/*.deb
+            deb/*.ddeb
 
-      - name: Upload Cloudberry source build artifacts
-        if: needs.check-skip.outputs.should_skip != 'true'
+      - name: Upload Cloudberry deb source build artifacts
         uses: actions/upload-artifact@v4
         with:
-          name: apache-cloudberry-db-incubating-source-build-artifacts
+          name: apache-cloudberry-db-incubating-deb-source-build-artifacts
           retention-days: ${{ env.LOG_RETENTION_DAYS }}
           if-no-files-found: error
           path: |
-            apache-cloudberry-incubating-src.tgz
+            deb/*.tar.xz
+            deb/*.changes
+            deb/*.dsc
+            deb/*.buildinfo
+            deb/debian/changelog
 
   ## ======================================================================
-  ## Job: rpm-install-test
+  ## Job: deb-install-test
   ## ======================================================================
 
-  rpm-install-test:
-    name: RPM Install Test Apache Cloudberry
-    needs: [check-skip, build]
+  deb-install-test:
+    name: DEB Install Test Apache Cloudberry
+    needs: [check-skip, build-deb]
+    if: |
+      !cancelled() &&
+      (needs.build-deb.result == 'success' || needs.build-deb.result == 
'skipped') &&
+      github.event.inputs.reuse_artifacts_from_run_id == ''
     runs-on: ubuntu-22.04
     timeout-minutes: 120
 
     container:
-      image: apache/incubator-cloudberry:cbdb-test-rocky9-latest
+      image: apache/incubator-cloudberry:cbdb-test-ubuntu22.04-latest
       options: >-
         --user root
         -h cdw
+        -v /usr/share:/host_usr_share
+        -v /usr/local:/host_usr_local
+        -v /opt:/host_opt
 
     steps:
+      - name: Free Disk Space
+        if: needs.check-skip.outputs.should_skip != 'true'
+        run: |
+          echo "=== Disk space before cleanup ==="
+          df -h /
+
+          # Remove pre-installed tools from host to free disk space
+          rm -rf /host_opt/hostedtoolcache || true   # GitHub Actions tool 
cache
+          rm -rf /host_usr_local/lib/android || true # Android SDK
+          rm -rf /host_usr_share/dotnet || true      # .NET SDK
+          rm -rf /host_opt/ghc || true               # Haskell GHC
+          rm -rf /host_usr_local/.ghcup || true      # Haskell GHCup
+          rm -rf /host_usr_share/swift || true       # Swift
+          rm -rf /host_usr_local/share/powershell || true  # PowerShell
+          rm -rf /host_usr_local/share/chromium || true    # Chromium
+          rm -rf /host_usr_share/miniconda || true   # Miniconda
+          rm -rf /host_opt/az || true                # Azure CLI
+          rm -rf /host_usr_share/sbt || true         # Scala Build Tool
+
+          echo "=== Disk space after cleanup ==="
+          df -h /
+
       - name: Skip Check
         if: needs.check-skip.outputs.should_skip == 'true'
         run: |
-          echo "RPM install test skipped via CI skip flag" >> 
"$GITHUB_STEP_SUMMARY"
+          echo "DEB install test skipped via CI skip flag" >> 
"$GITHUB_STEP_SUMMARY"
           exit 0
 
-      - name: Download Cloudberry RPM build artifacts
+      - name: Download Cloudberry DEB build artifacts
         if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/download-artifact@v4
         with:
-          name: apache-cloudberry-db-incubating-rpm-build-artifacts
-          path: ${{ github.workspace }}/rpm_build_artifacts
+          name: apache-cloudberry-db-incubating-deb-build-artifacts
+          path: ${{ github.workspace }}/deb_build_artifacts
+          run-id: ${{ github.event.inputs.reuse_artifacts_from_run_id || 
github.run_id }}
           merge-multiple: false
 
       - name: Cloudberry Environment Initialization
         if: needs.check-skip.outputs.should_skip != 'true'
+        shell: bash
         env:
           LOGS_DIR: install-logs
         run: |
@@ -756,97 +773,100 @@ jobs:
 
           echo "SRC_DIR=${GITHUB_WORKSPACE}" | tee -a "$GITHUB_ENV"
 
-      - name: Verify RPM artifacts
-        if: needs.check-skip.outputs.should_skip != 'true'
+      - name: Verify DEB artifacts
         id: verify-artifacts
+        shell: bash
         run: |
           set -eo pipefail
 
-          RPM_FILE=$(ls 
"${GITHUB_WORKSPACE}"/rpm_build_artifacts/apache-cloudberry-db-incubating-[0-9]*.rpm
 | grep -v "debuginfo")
-          if [ ! -f "${RPM_FILE}" ]; then
-            echo "::error::RPM file not found"
+          DEB_FILE=$(ls "${GITHUB_WORKSPACE}"/deb_build_artifacts/*.deb)
+          if [ ! -f "${DEB_FILE}" ]; then
+            echo "::error::DEB file not found"
             exit 1
           fi
 
-          echo "rpm_file=${RPM_FILE}" >> "$GITHUB_OUTPUT"
+          echo "deb_file=${DEB_FILE}" >> "$GITHUB_OUTPUT"
 
-          echo "Verifying RPM artifacts..."
+          echo "Verifying DEB artifacts..."
           {
-            echo "=== RPM Verification Summary ==="
+            echo "=== DEB Verification Summary ==="
             echo "Timestamp: $(date -u)"
-            echo "RPM File: ${RPM_FILE}"
+            echo "DEB File: ${DEB_FILE}"
 
-            # Get RPM metadata and verify contents
+            # Get DEB metadata and verify contents
             echo "Package Information:"
-            rpm -qip "${RPM_FILE}"
+            dpkg-deb -f "${DEB_FILE}"
 
-            # Get key RPM attributes for verification
-            RPM_VERSION=$(rpm -qp --queryformat "%{VERSION}" "${RPM_FILE}")
-            RPM_RELEASE=$(rpm -qp --queryformat "%{RELEASE}" "${RPM_FILE}")
-            echo "version=${RPM_VERSION}" >> "$GITHUB_OUTPUT"
-            echo "release=${RPM_RELEASE}" >> "$GITHUB_OUTPUT"
+            # Get key DEB attributes for verification
+            DEB_VERSION=$(dpkg-deb -f "${DEB_FILE}" Version | cut -d'-' -f 1)
+            DEB_RELEASE=$(dpkg-deb -f "${DEB_FILE}" Version | cut -d'-' -f 3)
+            echo "version=${DEB_VERSION}" >> "$GITHUB_OUTPUT"
+            echo "release=${DEB_RELEASE}" >> "$GITHUB_OUTPUT"
 
-            # Verify expected binaries are in the RPM
-            echo "Verifying critical files in RPM..."
+            # Verify expected binaries are in the DEB
+            echo "Verifying critical files in DEB..."
             for binary in "bin/postgres" "bin/psql"; do
-              if ! rpm -qlp "${RPM_FILE}" | grep -q "${binary}$"; then
-                echo "::error::Critical binary '${binary}' not found in RPM"
+              if ! dpkg-deb -c "${DEB_FILE}" | grep "${binary}" > /dev/null; 
then
+                echo "::error::Critical binary '${binary}' not found in DEB"
                 exit 1
               fi
             done
 
-            echo "RPM Details:"
-            echo "- Version: ${RPM_VERSION}"
-            echo "- Release: ${RPM_RELEASE}"
+            echo "DEB Details:"
+            echo "- Version: ${DEB_VERSION}"
+            echo "- Release: ${DEB_RELEASE}"
 
             # Calculate and store checksum
             echo "Checksum:"
-            sha256sum "${RPM_FILE}"
+            sha256sum "${DEB_FILE}"
 
-          } 2>&1 | tee -a install-logs/details/rpm-verification.log
+          } 2>&1 | tee -a install-logs/details/deb-verification.log
 
-      - name: Install Cloudberry RPM
-        if: success() && needs.check-skip.outputs.should_skip != 'true'
+      - name: Install Cloudberry DEB
+        shell: bash
         env:
-          RPM_FILE: ${{ steps.verify-artifacts.outputs.rpm_file }}
-          RPM_VERSION: ${{ steps.verify-artifacts.outputs.version }}
-          RPM_RELEASE: ${{ steps.verify-artifacts.outputs.release }}
+          DEB_FILE: ${{ steps.verify-artifacts.outputs.deb_file }}
+          DEB_VERSION: ${{ steps.verify-artifacts.outputs.version }}
+          DEB_RELEASE: ${{ steps.verify-artifacts.outputs.release }}
         run: |
           set -eo pipefail
 
-          if [ -z "${RPM_FILE}" ]; then
-            echo "::error::RPM_FILE environment variable is not set"
+          if [ -z "${DEB_FILE}" ]; then
+            echo "::error::DEB_FILE environment variable is not set"
             exit 1
           fi
 
           {
-            echo "=== RPM Installation Log ==="
+            echo "=== DEB Installation Log ==="
             echo "Timestamp: $(date -u)"
-            echo "RPM File: ${RPM_FILE}"
-            echo "Version: ${RPM_VERSION}"
-            echo "Release: ${RPM_RELEASE}"
+            echo "DEB File: ${DEB_FILE}"
+            echo "Version: ${DEB_VERSION}"
+            echo "Release: ${DEB_RELEASE}"
 
             # Clean install location
             rm -rf /usr/local/cloudberry-db
 
-            # Install RPM
+            # Install DEB
             echo "Starting installation..."
-            if ! time dnf install -y "${RPM_FILE}"; then
-              echo "::error::RPM installation failed"
+            apt-get update
+            if ! apt-get -y install "${DEB_FILE}"; then
+              echo "::error::DEB installation failed"
               exit 1
             fi
 
+            # Change ownership back to gpadmin - it is needed for future tests
+            chown -R gpadmin:gpadmin /usr/local/cloudberry-db
+
             echo "Installation completed successfully"
-            rpm -qi apache-cloudberry-db-incubating
+            dpkg-query -s apache-cloudberry-db-incubating
             echo "Installed files:"
-            rpm -ql apache-cloudberry-db-incubating
-          } 2>&1 | tee -a install-logs/details/rpm-installation.log
+            dpkg-query -L apache-cloudberry-db-incubating
+          } 2>&1 | tee -a install-logs/details/deb-installation.log
 
       - name: Upload install logs
-        if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/upload-artifact@v4
         with:
-          name: install-logs-${{ needs.build.outputs.build_timestamp }}
+          name: install-logs-${{ matrix.name }}-${{ 
needs.build-deb.outputs.build_timestamp }}
           path: |
             install-logs/
           retention-days: ${{ env.LOG_RETENTION_DAYS }}
@@ -859,26 +879,29 @@ jobs:
             echo "# Installed Package Summary"
             echo "\`\`\`"
 
-            rpm -qi apache-cloudberry-db-incubating
+            dpkg-query -s apache-cloudberry-db-incubating
             echo "\`\`\`"
           } >> "$GITHUB_STEP_SUMMARY" || true
 
   ## ======================================================================
-  ## Job: test
+  ## Job: test-deb
   ## ======================================================================
 
-  test:
+  test-deb:
     name: ${{ matrix.test }}
-    needs: [check-skip, build, prepare-test-matrix]
+    needs: [check-skip, build-deb, prepare-test-matrix-deb]
+    if: |
+      !cancelled() &&
+      (needs.build-deb.result == 'success' || needs.build-deb.result == 
'skipped')
     runs-on: ubuntu-22.04
     timeout-minutes: 120
     # actionlint-allow matrix[*].pg_settings
     strategy:
       fail-fast: false  # Continue with other tests if one fails
-      matrix: ${{ fromJson(needs.prepare-test-matrix.outputs.test-matrix) }}
+      matrix: ${{ fromJson(needs.prepare-test-matrix-deb.outputs.test-matrix) 
}}
 
     container:
-      image: apache/incubator-cloudberry:cbdb-build-rocky9-latest
+      image: apache/incubator-cloudberry:cbdb-build-ubuntu22.04-latest
       options: >-
         --privileged
         --user root
@@ -887,8 +910,33 @@ jobs:
         --ulimit core=-1
         --cgroupns=host
         -v /sys/fs/cgroup:/sys/fs/cgroup:rw
+        -v /usr/share:/host_usr_share
+        -v /usr/local:/host_usr_local
+        -v /opt:/host_opt
 
     steps:
+      - name: Free Disk Space
+        if: needs.check-skip.outputs.should_skip != 'true'
+        run: |
+          echo "=== Disk space before cleanup ==="
+          df -h /
+
+          # Remove pre-installed tools from host to free disk space
+          rm -rf /host_opt/hostedtoolcache || true   # GitHub Actions tool 
cache
+          rm -rf /host_usr_local/lib/android || true # Android SDK
+          rm -rf /host_usr_share/dotnet || true      # .NET SDK
+          rm -rf /host_opt/ghc || true               # Haskell GHC
+          rm -rf /host_usr_local/.ghcup || true      # Haskell GHCup
+          rm -rf /host_usr_share/swift || true       # Swift
+          rm -rf /host_usr_local/share/powershell || true  # PowerShell
+          rm -rf /host_usr_local/share/chromium || true    # Chromium
+          rm -rf /host_usr_share/miniconda || true   # Miniconda
+          rm -rf /host_opt/az || true                # Azure CLI
+          rm -rf /host_usr_share/sbt || true         # Scala Build Tool
+
+          echo "=== Disk space after cleanup ==="
+          df -h /
+
       - name: Skip Check
         if: needs.check-skip.outputs.should_skip == 'true'
         run: |
@@ -898,27 +946,10 @@ jobs:
       - name: Use timestamp from previous job
         if: needs.check-skip.outputs.should_skip != 'true'
         run: |
-          echo "Timestamp from output: ${{ needs.build.outputs.build_timestamp 
}}"
-
-      - name: Checkout CI Build/Test Scripts
-        if: needs.check-skip.outputs.should_skip != 'true'
-        uses: actions/checkout@v4
-        with:
-          repository: apache/cloudberry-devops-release
-          ref: main
-          path: cloudberry-devops-release
-          fetch-depth: 1
-
-      - name: Move cloudberry-devops-release directory
-        if: needs.check-skip.outputs.should_skip != 'true'
-        run: |
-          set -eo pipefail
-          if ! mv "${GITHUB_WORKSPACE}"/cloudberry-devops-release 
"${GITHUB_WORKSPACE}"/..; then
-            echo "::error::Container initialization failed"
-            exit 1
-          fi
+          echo "Timestamp from output: ${{ 
needs.build-deb.outputs.build_timestamp }}"
 
       - name: Cloudberry Environment Initialization
+        shell: bash
         env:
           LOGS_DIR: build-logs
         run: |
@@ -1110,29 +1141,34 @@ jobs:
             fi
           } >> "$GITHUB_STEP_SUMMARY"
 
-      - name: Download Cloudberry RPM build artifacts
+      - name: Download Cloudberry DEB build artifacts
         if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/download-artifact@v4
         with:
-          name: apache-cloudberry-db-incubating-rpm-build-artifacts
-          path: ${{ github.workspace }}/rpm_build_artifacts
+          name: apache-cloudberry-db-incubating-deb-build-artifacts
+          path: ${{ github.workspace }}/deb_build_artifacts
           merge-multiple: false
+          run-id: ${{ github.event.inputs.reuse_artifacts_from_run_id || 
github.run_id }}
+          github-token: ${{ secrets.GITHUB_TOKEN }}
 
       - name: Download Cloudberry Source build artifacts
         if: needs.check-skip.outputs.should_skip != 'true'
         uses: actions/download-artifact@v4
         with:
-          name: apache-cloudberry-db-incubating-source-build-artifacts
+          name: apache-cloudberry-db-incubating-deb-source-build-artifacts
           path: ${{ github.workspace }}/source_build_artifacts
           merge-multiple: false
+          run-id: ${{ github.event.inputs.reuse_artifacts_from_run_id || 
github.run_id }}
+          github-token: ${{ secrets.GITHUB_TOKEN }}
 
-      - name: Verify downloaded artifacts
+      - name: Verify DEB artifacts
         if: needs.check-skip.outputs.should_skip != 'true'
         id: verify-artifacts
+        shell: bash
         run: |
           set -eo pipefail
 
-          SRC_TARBALL_FILE=$(ls 
"${GITHUB_WORKSPACE}"/source_build_artifacts/apache-cloudberry-incubating-src.tgz)
+          SRC_TARBALL_FILE=$(ls 
"${GITHUB_WORKSPACE}"/source_build_artifacts/apache-cloudberry-db-incubating_*.tar.xz)
           if [ ! -f "${SRC_TARBALL_FILE}" ]; then
             echo "::error::SRC TARBALL file not found"
             exit 1
@@ -1152,86 +1188,94 @@ jobs:
 
           } 2>&1 | tee -a build-logs/details/src-tarball-verification.log
 
-          RPM_FILE=$(ls 
"${GITHUB_WORKSPACE}"/rpm_build_artifacts/apache-cloudberry-db-incubating-[0-9]*.rpm
 | grep -v "debuginfo")
-          if [ ! -f "${RPM_FILE}" ]; then
-            echo "::error::RPM file not found"
+          DEB_FILE=$(ls "${GITHUB_WORKSPACE}"/deb_build_artifacts/*.deb)
+          if [ ! -f "${DEB_FILE}" ]; then
+            echo "::error::DEB file not found"
             exit 1
           fi
 
-          echo "rpm_file=${RPM_FILE}" >> "$GITHUB_OUTPUT"
+          echo "deb_file=${DEB_FILE}" >> "$GITHUB_OUTPUT"
 
-          echo "Verifying RPM artifacts..."
+          echo "Verifying DEB artifacts..."
           {
-            echo "=== RPM Verification Summary ==="
+            echo "=== DEB Verification Summary ==="
             echo "Timestamp: $(date -u)"
-            echo "RPM File: ${RPM_FILE}"
+            echo "DEB File: ${DEB_FILE}"
 
-            # Get RPM metadata and verify contents
+            # Get DEB metadata and verify contents
             echo "Package Information:"
-            rpm -qip "${RPM_FILE}"
+            dpkg-deb -f "${DEB_FILE}"
 
-            # Get key RPM attributes for verification
-            RPM_VERSION=$(rpm -qp --queryformat "%{VERSION}" "${RPM_FILE}")
-            RPM_RELEASE=$(rpm -qp --queryformat "%{RELEASE}" "${RPM_FILE}")
-            echo "version=${RPM_VERSION}" >> "$GITHUB_OUTPUT"
-            echo "release=${RPM_RELEASE}" >> "$GITHUB_OUTPUT"
+            # Get key DEB attributes for verification
+            DEB_VERSION=$(dpkg-deb -f "${DEB_FILE}" Version | cut -d'-' -f 1)
+            DEB_RELEASE=$(dpkg-deb -f "${DEB_FILE}" Version | cut -d'-' -f 3)
+            echo "version=${DEB_VERSION}" >> "$GITHUB_OUTPUT"
+            echo "release=${DEB_RELEASE}" >> "$GITHUB_OUTPUT"
 
-            # Verify expected binaries are in the RPM
-            echo "Verifying critical files in RPM..."
+            # Verify expected binaries are in the DEB
+            echo "Verifying critical files in DEB..."
             for binary in "bin/postgres" "bin/psql"; do
-              if ! rpm -qlp "${RPM_FILE}" | grep -q "${binary}$"; then
-                echo "::error::Critical binary '${binary}' not found in RPM"
+              if ! dpkg-deb -c "${DEB_FILE}" | grep "${binary}" > /dev/null; 
then
+                echo "::error::Critical binary '${binary}' not found in DEB"
                 exit 1
               fi
             done
 
-            echo "RPM Details:"
-            echo "- Version: ${RPM_VERSION}"
-            echo "- Release: ${RPM_RELEASE}"
+            echo "DEB Details:"
+            echo "- Version: ${DEB_VERSION}"
+            echo "- Release: ${DEB_RELEASE}"
 
             # Calculate and store checksum
             echo "Checksum:"
-            sha256sum "${RPM_FILE}"
+            sha256sum "${DEB_FILE}"
 
-          } 2>&1 | tee -a build-logs/details/rpm-verification.log
+          } 2>&1 | tee -a build-logs/details/deb-verification.log
 
-      - name: Install Cloudberry RPM
+      - name: Install Cloudberry DEB
         if: success() && needs.check-skip.outputs.should_skip != 'true'
+        shell: bash
         env:
-          RPM_FILE: ${{ steps.verify-artifacts.outputs.rpm_file }}
-          RPM_VERSION: ${{ steps.verify-artifacts.outputs.version }}
-          RPM_RELEASE: ${{ steps.verify-artifacts.outputs.release }}
+          DEB_FILE: ${{ steps.verify-artifacts.outputs.deb_file }}
+          DEB_VERSION: ${{ steps.verify-artifacts.outputs.version }}
+          DEB_RELEASE: ${{ steps.verify-artifacts.outputs.release }}
         run: |
           set -eo pipefail
 
-          if [ -z "${RPM_FILE}" ]; then
-            echo "::error::RPM_FILE environment variable is not set"
+          if [ -z "${DEB_FILE}" ]; then
+            echo "::error::DEB_FILE environment variable is not set"
             exit 1
           fi
 
           {
-            echo "=== RPM Installation Log ==="
+            echo "=== DEB Installation Log ==="
             echo "Timestamp: $(date -u)"
-            echo "RPM File: ${RPM_FILE}"
-            echo "Version: ${RPM_VERSION}"
-            echo "Release: ${RPM_RELEASE}"
+            echo "DEB File: ${DEB_FILE}"
+            echo "Version: ${DEB_VERSION}"
+            echo "Release: ${DEB_RELEASE}"
 
             # Clean install location
             rm -rf /usr/local/cloudberry-db
 
-            # Install RPM
+            # Install DEB
             echo "Starting installation..."
-            if ! time dnf install -y "${RPM_FILE}"; then
-              echo "::error::RPM installation failed"
+            apt-get update
+            if ! apt-get -y install "${DEB_FILE}"; then
+              echo "::error::DEB installation failed"
               exit 1
             fi
 
+            # Change ownership back to gpadmin - it is needed for future tests
+            chown -R gpadmin:gpadmin /usr/local/cloudberry-db
+
             echo "Installation completed successfully"
-            rpm -qi apache-cloudberry-db-incubating
-          } 2>&1 | tee -a build-logs/details/rpm-installation.log
+            dpkg-query -s apache-cloudberry-db-incubating
+            echo "Installed files:"
+            dpkg-query -L apache-cloudberry-db-incubating
+          } 2>&1 | tee -a build-logs/details/deb-installation.log
 
       - name: Extract source tarball
         if: success() && needs.check-skip.outputs.should_skip != 'true'
+        shell: bash
         env:
           SRC_TARBALL_FILE: ${{ 
steps.verify-artifacts.outputs.src_tarball_file }}
           SRC_DIR: ${{ github.workspace }}
@@ -1243,7 +1287,8 @@ jobs:
             echo "Timestamp: $(date -u)"
 
             echo "Starting extraction..."
-            if ! time tar zxf "${SRC_TARBALL_FILE}" -C "${SRC_DIR}"/.. ; then
+            file "${SRC_TARBALL_FILE}"
+            if ! time tar xf "${SRC_TARBALL_FILE}" -C "${SRC_DIR}"/.. ; then
               echo "::error::Source extraction failed"
               exit 1
             fi
@@ -1255,16 +1300,49 @@ jobs:
             du -sh "${SRC_DIR}/../cloudberry"
           } 2>&1 | tee -a build-logs/details/source-extraction.log
 
+      - name: Prepare DEB Environment
+        if: success() && needs.check-skip.outputs.should_skip != 'true'
+        shell: bash
+        env:
+          SRC_DIR: ${{ github.workspace }}
+        run: |
+          set -eo pipefail
+
+          {
+
+            # change ownership to gpadmin
+            chown -R gpadmin "${SRC_DIR}/../cloudberry"
+            touch build-logs/sections.log
+            chown gpadmin build-logs/sections.log
+            chmod 777 build-logs
+
+            # configure link lib directory to temporary location, fix it
+            rm -rf "${SRC_DIR}"/debian/build/lib
+            ln -sf /usr/cloudberry-db/lib "${SRC_DIR}"/debian/build/lib
+
+            # check if regress.so exists in src directory - it is needed for 
contrib/dblink tests
+            if [ ! -f ${SRC_DIR}/src/test/regress/regress.so ]; then
+                ln -sf /usr/cloudberry-db/lib/postgresql/regress.so 
${SRC_DIR}/src/test/regress/regress.so
+            fi
+
+            # FIXME
+            # temporary install gdb - delete after creating new docker 
build/test contaners
+            apt-get update
+            apt-get -y install gdb
+
+          } 2>&1 | tee -a build-logs/details/prepare-deb-env.log
+
       - name: Create Apache Cloudberry demo cluster
         if: success() && needs.check-skip.outputs.should_skip != 'true'
+        shell: bash
         env:
           SRC_DIR: ${{ github.workspace }}
         run: |
           set -eo pipefail
 
           {
-            chmod +x 
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh
-            if ! time su - gpadmin -c "cd ${SRC_DIR} && 
NUM_PRIMARY_MIRROR_PAIRS='${{ matrix.num_primary_mirror_pairs }}' 
SRC_DIR=${SRC_DIR} 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh";
 then
+            chmod +x 
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh
+            if ! time su - gpadmin -c "cd ${SRC_DIR} && 
NUM_PRIMARY_MIRROR_PAIRS='${{ matrix.num_primary_mirror_pairs }}' 
SRC_DIR=${SRC_DIR} 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh";
 then
               echo "::error::Demo cluster creation failed"
               exit 1
             fi
@@ -1298,6 +1376,7 @@ jobs:
           # 2. Follow the same pattern as optimizer
           # 3. Update matrix entries to include the new setting
 
+
           # Set PostgreSQL options if defined
           PG_OPTS=""
           if [[ "${{ matrix.pg_settings.optimizer != '' }}" == "true" ]]; then
@@ -1339,7 +1418,7 @@ jobs:
                  MAKE_DIRECTORY='-C $dir' \
                  PGOPTIONS='${PG_OPTS}' \
                  SRC_DIR='${SRC_DIR}' \
-                 
${SRC_DIR}/../cloudberry-devops-release/build_automation/cloudberry/scripts/test-cloudberry.sh"
 \
+                 
${SRC_DIR}/devops/build/automation/cloudberry/scripts/test-cloudberry.sh" \
                  2>&1 | tee "$config_log"; then
               echo "::warning::Test execution failed for configuration 
$((i+1)): make -C $dir $target"
               overall_status=1
@@ -1372,7 +1451,7 @@ jobs:
             ls -Rl "/tmp/cloudberry-cores"
             echo "-----------------------------------------"
 
-            
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/analyze_core_dumps.sh
 "$test_id"
+            
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/analyze_core_dumps.sh 
"$test_id"
             core_analysis_rc=$?
             case "$core_analysis_rc" in
               0) echo "No core dumps found for this configuration" ;;
@@ -1448,7 +1527,7 @@ jobs:
             # Parse this configuration's results
 
             MAKE_NAME="${{ matrix.test }}-config$i" \
-            
"${SRC_DIR}"/../cloudberry-devops-release/build_automation/cloudberry/scripts/parse-test-results.sh
 "$config_log"
+            
"${SRC_DIR}"/devops/build/automation/cloudberry/scripts/parse-test-results.sh 
"$config_log"
             status_code=$?
 
             {
@@ -1691,7 +1770,7 @@ jobs:
         if: always()
         uses: actions/upload-artifact@v4
         with:
-          name: test-logs-${{ matrix.test }}-${{ 
needs.build.outputs.build_timestamp }}
+          name: test-logs-${{ matrix.test }}-${{ 
needs.build-deb.outputs.build_timestamp }}
           path: |
             build-logs/
           retention-days: ${{ env.LOG_RETENTION_DAYS }}
@@ -1708,7 +1787,7 @@ jobs:
       - name: Upload test results files
         uses: actions/upload-artifact@v4
         with:
-          name: results-${{ matrix.test }}-${{ 
needs.build.outputs.build_timestamp }}
+          name: results-${{ matrix.test }}-${{ 
needs.build-deb.outputs.build_timestamp }}
           path: |
             **/regression.out
             **/regression.diffs
@@ -1719,7 +1798,7 @@ jobs:
         if: failure() || cancelled()
         uses: actions/upload-artifact@v4
         with:
-          name: regression-logs-${{ matrix.test }}-${{ 
needs.build.outputs.build_timestamp }}
+          name: regression-logs-${{ matrix.test }}-${{ 
needs.build-deb.outputs.build_timestamp }}
           path: |
             **/regression.out
             **/regression.diffs
@@ -1735,12 +1814,12 @@ jobs:
           retention-days: ${{ env.LOG_RETENTION_DAYS }}
 
   ## ======================================================================
-  ## Job: report
+  ## Job: report-deb
   ## ======================================================================
 
-  report:
+  report-deb:
     name: Generate Apache Cloudberry Build Report
-    needs: [check-skip, build, prepare-test-matrix, rpm-install-test, test]
+    needs: [check-skip, build-deb, prepare-test-matrix-deb, deb-install-test, 
test-deb]
     if: always()
     runs-on: ubuntu-22.04
     steps:
@@ -1755,21 +1834,21 @@ jobs:
               echo "- Completion Time: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
             else
               echo "## Job Status"
-              echo "- Build Job: ${{ needs.build.result }}"
-              echo "- Test Job: ${{ needs.test.result }}"
+              echo "- Build Job: ${{ needs.build-deb.result }}"
+              echo "- Test Job: ${{ needs.test-deb.result }}"
               echo "- Completion Time: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
 
-              if [[ "${{ needs.build.result }}" == "success" && "${{ 
needs.test.result }}" == "success" ]]; then
+              if [[ "${{ needs.build-deb.result }}" == "success" && "${{ 
needs.test-deb.result }}" == "success" ]]; then
                 echo "✅ Pipeline completed successfully"
               else
                 echo "⚠️ Pipeline completed with failures"
 
-                if [[ "${{ needs.build.result }}" != "success" ]]; then
+                if [[ "${{ needs.build-deb.result }}" != "success" ]]; then
                   echo "### Build Job Failure"
                   echo "Check build logs for details"
                 fi
 
-                if [[ "${{ needs.test.result }}" != "success" ]]; then
+                if [[ "${{ needs.test-deb.result }}" != "success" ]]; then
                   echo "### Test Job Failure"
                   echo "Check test logs and regression files for details"
                 fi
@@ -1780,9 +1859,9 @@ jobs:
       - name: Notify on failure
         if: |
           needs.check-skip.outputs.should_skip != 'true' &&
-          (needs.build.result != 'success' || needs.test.result != 'success')
+          (needs.build-deb.result != 'success' || needs.test-deb.result != 
'success')
         run: |
           echo "::error::Build/Test pipeline failed! Check job summaries and 
logs for details"
           echo "Timestamp: $(date -u +'%Y-%m-%d %H:%M:%S UTC')"
-          echo "Build Result: ${{ needs.build.result }}"
-          echo "Test Result: ${{ needs.test.result }}"
+          echo "Build Result: ${{ needs.build-deb.result }}"
+          echo "Test Result: ${{ needs.test-deb.result }}"
diff --git a/.github/workflows/pg16-merge-validation.yml 
b/.github/workflows/pg16-merge-validation.yml
index db296a9c82e..c2f093f3de4 100644
--- a/.github/workflows/pg16-merge-validation.yml
+++ b/.github/workflows/pg16-merge-validation.yml
@@ -114,12 +114,21 @@ jobs:
               {"test":"ic-small-opt-off",
                 "make_configs":["src/test/regress:installcheck-small"],
                 "pg_settings":{"optimizer":"off"}
+              },
+              {"test":"ic-greenplum-schedule",
+                "make_configs":["src/test/regress:installcheck-cbdb"],
+                "pg_settings":{"optimizer":"off"}
+              },
+              {"test":"ic-isolation2-basic",
+                "make_configs":["src/test/isolation2:installcheck-isolation2"],
+                "pg_settings":{"optimizer":"off"},
+                "enable_core_check":false
               }
             ]
           }'
           
           # Tests to be added as PG16 support improves:
-          # - ic-good-opt-off: Basic installcheck with optimizer off
+          # - ic-good-opt-off: Basic installcheck with optimizer off (includes 
greenplum_schedule)
           #   {"test":"ic-good-opt-off",
           #    "make_configs":["src/test/regress:installcheck-good"],
           #    "pg_settings":{"optimizer":"off"}
@@ -131,11 +140,6 @@ jobs:
           #    "pg_settings":{"optimizer":"on"}
           #   }
           #
-          # - ic-isolation2: Isolation2 tests
-          #   {"test":"ic-isolation2",
-          #    "make_configs":["src/test/isolation2:installcheck-isolation2"]
-          #   }
-          #
           # - ic-contrib: Contrib module tests
           #   {"test":"ic-contrib",
           #    "make_configs":["contrib/auto_explain:installcheck",
@@ -147,6 +151,15 @@ jobs:
           #    "make_configs":["gpcontrib/orafce:installcheck",
           #                    "gpcontrib/gp_toolkit:installcheck"]
           #   }
+          #
+          # - ic-isolation2-advanced: More isolation2 tests
+          #   {"test":"ic-isolation2-expandshrink",
+          #    "make_configs":["src/test/isolation2:installcheck-expandshrink"]
+          #   }
+          #   {"test":"ic-isolation2-crash",
+          #    
"make_configs":["src/test/isolation2:installcheck-isolation2-crash"],
+          #    "enable_core_check":false
+          #   }
           
           # Function to apply defaults to test configurations
           apply_defaults() {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to