Skip to content

Commit 94a5000

Browse files
authored
Merge pull request #4 from leborchuk/AddJammyBuild
Add jammy build
2 parents 64f6984 + a4bf288 commit 94a5000

File tree

20 files changed

+390
-34
lines changed

20 files changed

+390
-34
lines changed

.github/workflows/docker-cbdb-build-containers.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,8 @@ jobs:
172172
platforms: linux/amd64,linux/arm64
173173
# Tag with both latest and version-specific tags
174174
tags: |
175-
apache/incubator-cloudberry:cbdb-build-${{ matrix.platform }}-latest
176-
apache/incubator-cloudberry:cbdb-build-${{ matrix.platform }}-${{ steps.version.outputs.BUILD_DATE }}-${{ steps.version.outputs.SHA_SHORT }}
175+
ghcr.io/${{ github.repository }}:cbdb-build-${{ matrix.platform }}-latest
176+
ghcr.io/${{ github.repository }}:cbdb-build-${{ matrix.platform }}-${{ steps.version.outputs.BUILD_DATE }}-${{ steps.version.outputs.SHA_SHORT }}
177177
# Add standard Open Container Initiative (OCI) labels
178178
labels: |
179179
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
@@ -196,15 +196,15 @@ jobs:
196196
echo "- **Build Date**: ${{ steps.version.outputs.BUILD_DATE }}" >> $GITHUB_STEP_SUMMARY
197197
echo "" >> $GITHUB_STEP_SUMMARY
198198
echo "#### 🐳 Docker Images" >> $GITHUB_STEP_SUMMARY
199-
echo "- Latest tag: \`apache/incubator-cloudberry:cbdb-build-${{ matrix.platform }}-latest\`" >> $GITHUB_STEP_SUMMARY
200-
echo "- Version tag: \`apache/incubator-cloudberry:cbdb-build-${{ matrix.platform }}-${{ steps.version.outputs.BUILD_DATE }}-${{ steps.version.outputs.SHA_SHORT }}\`" >> $GITHUB_STEP_SUMMARY
199+
echo "- Latest tag: \`ghcr.io/${{ github.repository }}:cbdb-build-${{ matrix.platform }}-latest\`" >> $GITHUB_STEP_SUMMARY
200+
echo "- Version tag: \`ghcr.io/${{ github.repository }}:cbdb-build-${{ matrix.platform }}-${{ steps.version.outputs.BUILD_DATE }}-${{ steps.version.outputs.SHA_SHORT }}\`" >> $GITHUB_STEP_SUMMARY
201201
echo "" >> $GITHUB_STEP_SUMMARY
202202
echo "#### 📋 Quick Reference" >> $GITHUB_STEP_SUMMARY
203203
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
204204
echo "# Pull the image (automatically selects correct architecture)" >> $GITHUB_STEP_SUMMARY
205-
echo "docker pull apache/incubator-cloudberry:cbdb-build-${{ matrix.platform }}-latest" >> $GITHUB_STEP_SUMMARY
205+
echo "docker pull ghcr.io/${{ github.repository }}:cbdb-build-${{ matrix.platform }}-latest" >> $GITHUB_STEP_SUMMARY
206206
echo "" >> $GITHUB_STEP_SUMMARY
207207
echo "# Pull specific architecture if needed" >> $GITHUB_STEP_SUMMARY
208-
echo "docker pull --platform linux/amd64 apache/incubator-cloudberry:cbdb-build-${{ matrix.platform }}-latest" >> $GITHUB_STEP_SUMMARY
209-
echo "docker pull --platform linux/arm64 apache/incubator-cloudberry:cbdb-build-${{ matrix.platform }}-latest" >> $GITHUB_STEP_SUMMARY
208+
echo "docker pull --platform linux/amd64 ghcr.io/${{ github.repository }}:cbdb-build-${{ matrix.platform }}-latest" >> $GITHUB_STEP_SUMMARY
209+
echo "docker pull --platform linux/arm64 ghcr.io/${{ github.repository }}:cbdb-build-${{ matrix.platform }}-latest" >> $GITHUB_STEP_SUMMARY
210210
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

.github/workflows/docker-cbdb-test-containers.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,8 @@ jobs:
147147
type=gha,scope=docker-cbdb-test-${{ matrix.platform }}
148148
# Tag with both latest and version-specific tags
149149
tags: |
150-
apache/incubator-cloudberry:cbdb-test-${{ matrix.platform }}-latest
151-
apache/incubator-cloudberry:cbdb-test-${{ matrix.platform }}-${{ steps.version.outputs.BUILD_DATE }}-${{ steps.version.outputs.SHA_SHORT }}
150+
ghcr.io/${{ github.repository }}:cbdb-test-${{ matrix.platform }}-latest
151+
ghcr.io/${{ github.repository }}:cbdb-test-${{ matrix.platform }}-${{ steps.version.outputs.BUILD_DATE }}-${{ steps.version.outputs.SHA_SHORT }}
152152
# Add metadata labels for better image tracking
153153
labels: |
154154
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
@@ -171,15 +171,15 @@ jobs:
171171
echo "- **Build Date**: ${{ steps.version.outputs.BUILD_DATE }}" >> $GITHUB_STEP_SUMMARY
172172
echo "" >> $GITHUB_STEP_SUMMARY
173173
echo "#### 🐳 Docker Images" >> $GITHUB_STEP_SUMMARY
174-
echo "- Latest tag: \`apache/incubator-cloudberry:cbdb-test-${{ matrix.platform }}-latest\`" >> $GITHUB_STEP_SUMMARY
175-
echo "- Version tag: \`apache/incubator-cloudberry:cbdb-test-${{ matrix.platform }}-${{ steps.version.outputs.BUILD_DATE }}-${{ steps.version.outputs.SHA_SHORT }}\`" >> $GITHUB_STEP_SUMMARY
174+
echo "- Latest tag: \`ghcr.io/${{ github.repository }}:cbdb-test-${{ matrix.platform }}-latest\`" >> $GITHUB_STEP_SUMMARY
175+
echo "- Version tag: \`ghcr.io/${{ github.repository }}:cbdb-test-${{ matrix.platform }}-${{ steps.version.outputs.BUILD_DATE }}-${{ steps.version.outputs.SHA_SHORT }}\`" >> $GITHUB_STEP_SUMMARY
176176
echo "" >> $GITHUB_STEP_SUMMARY
177177
echo "#### 📋 Quick Reference" >> $GITHUB_STEP_SUMMARY
178178
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
179179
echo "# Pull the image (automatically selects correct architecture)" >> $GITHUB_STEP_SUMMARY
180-
echo "docker pull apache/incubator-cloudberry:cbdb-test-${{ matrix.platform }}-latest" >> $GITHUB_STEP_SUMMARY
180+
echo "docker pull ghcr.io/${{ github.repository }}:cbdb-test-${{ matrix.platform }}-latest" >> $GITHUB_STEP_SUMMARY
181181
echo "" >> $GITHUB_STEP_SUMMARY
182182
echo "# Pull specific architecture if needed" >> $GITHUB_STEP_SUMMARY
183-
echo "docker pull --platform linux/amd64 apache/incubator-cloudberry:cbdb-test-${{ matrix.platform }}-latest" >> $GITHUB_STEP_SUMMARY
184-
echo "docker pull --platform linux/arm64 apache/incubator-cloudberry:cbdb-test-${{ matrix.platform }}-latest" >> $GITHUB_STEP_SUMMARY
183+
echo "docker pull --platform linux/amd64 ghcr.io/${{ github.repository }}:cbdb-test-${{ matrix.platform }}-latest" >> $GITHUB_STEP_SUMMARY
184+
echo "docker pull --platform linux/arm64 ghcr.io/${{ github.repository }}:cbdb-test-${{ matrix.platform }}-latest" >> $GITHUB_STEP_SUMMARY
185185
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

build_automation/cloudberry/scripts/build-cloudberry.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
# Prerequisites:
4646
# - configure-cloudberry.sh must be run first
4747
# - Required build dependencies must be installed
48-
# - /usr/local/cloudberry-db/lib must exist and be writable
48+
# - ${BUILD_DESTINATION}/lib must exist and be writable
4949
#
5050
# Exit Codes:
5151
# 0 - Build and installation completed successfully
@@ -67,11 +67,11 @@ export LOG_DIR="${SRC_DIR}/build-logs"
6767
BUILD_LOG="${LOG_DIR}/build.log"
6868

6969
# Initialize environment
70-
init_environment "Cloudberry Build Script" "${BUILD_LOG}"
70+
init_environment "Cloudberry Build Script" "${BUILD_LOG}" "${BUILD_DESTINATION}"
7171

7272
# Set environment
7373
log_section "Environment Setup"
74-
export LD_LIBRARY_PATH=/usr/local/cloudberry-db/lib:LD_LIBRARY_PATH
74+
export LD_LIBRARY_PATH=${BUILD_DESTINATION}/lib:LD_LIBRARY_PATH
7575
log_section_end "Environment Setup"
7676

7777
# Build process

build_automation/cloudberry/scripts/cloudberry-utils.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@
3030
# LOG_DIR - Directory for logs (defaults to ${SRC_DIR}/build-logs)
3131
#
3232
# Functions:
33-
# init_environment "Script Name" "Log File"
33+
# init_environment "Script Name" "Log File" "Build Destination"
3434
# - Initialize logging and verify environment
3535
# - Parameters:
3636
# * script_name: Name of the calling script
3737
# * log_file: Path to log file
38+
# * build_destination: Path to Cloudberry destination, by default is /usr/local/cloudberry-db
3839
# - Returns: 0 on success, 1 on failure
3940
#
4041
# execute_cmd command [args...]
@@ -70,7 +71,7 @@
7071
#
7172
# Example:
7273
# source ./cloudberry-utils.sh
73-
# init_environment "My Script" "${LOG_FILE}"
74+
# init_environment "My Script" "${LOG_FILE}" "${BUILD_DESTINATION}"
7475
# execute_cmd make clean
7576
# log_section "Build Process"
7677
# execute_cmd make -j$(nproc)
@@ -79,10 +80,18 @@
7980
#
8081
# --------------------------------------------------------------------
8182

83+
DEFAULT_BUILD_DESTINATION=/usr/local/cloudberry-db
84+
8285
# Initialize logging and environment
8386
init_environment() {
8487
local script_name=$1
8588
local log_file=$2
89+
local build_destination=$3
90+
91+
if [ -z "$build_destination" ]; then
92+
build_destination=${DEFAULT_BUILD_DESTINATION}
93+
fi
94+
export BUILD_DESTINATION=$build_destination
8695

8796
echo "=== Initializing environment for ${script_name} ==="
8897
echo "${script_name} executed at $(date)" | tee -a "${log_file}"
@@ -91,6 +100,7 @@ init_environment() {
91100
echo "Working directory: $(pwd)" | tee -a "${log_file}"
92101
echo "Source directory: ${SRC_DIR}" | tee -a "${log_file}"
93102
echo "Log directory: ${LOG_DIR}" | tee -a "${log_file}"
103+
echo "Build destination: ${BUILD_DESTINATION}" | tee -a "${log_file}"
94104

95105
if [ -z "${SRC_DIR:-}" ]; then
96106
echo "Error: SRC_DIR environment variable is not set" | tee -a "${log_file}"

build_automation/cloudberry/scripts/configure-cloudberry.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# Description: Configures Apache Cloudberry build environment and runs
2424
# ./configure with optimized settings. Performs the
2525
# following:
26-
# 1. Prepares /usr/local/cloudberry-db directory
26+
# 1. Prepares ${BUILD_DESTINATION} directory
2727
# 2. Sets up library dependencies
2828
# 3. Configures build with required features enabled
2929
#
@@ -101,25 +101,26 @@ export LOG_DIR="${SRC_DIR}/build-logs"
101101
CONFIGURE_LOG="${LOG_DIR}/configure.log"
102102

103103
# Initialize environment
104-
init_environment "Cloudberry Configure Script" "${CONFIGURE_LOG}"
104+
init_environment "Cloudberry Configure Script" "${CONFIGURE_LOG}" "${BUILD_DESTINATION}"
105105

106106
# Initial setup
107107
log_section "Initial Setup"
108-
execute_cmd sudo rm -rf /usr/local/cloudberry-db || exit 2
108+
execute_cmd sudo rm -rf ${BUILD_DESTINATION}/* || exit 2
109109
execute_cmd sudo chmod a+w /usr/local || exit 2
110-
execute_cmd mkdir -p /usr/local/cloudberry-db/lib || exit 2
110+
111+
execute_cmd sudo mkdir -p ${BUILD_DESTINATION}/lib || exit 2
111112
if [[ "$OS_ID" == "rocky" && "$OS_VERSION" =~ ^(8|9) ]]; then
112113
execute_cmd sudo cp /usr/local/xerces-c/lib/libxerces-c.so \
113114
/usr/local/xerces-c/lib/libxerces-c-3.3.so \
114115
/usr/local/cloudberry-db/lib || exit 3
115116
fi
117+
execute_cmd sudo chown -R gpadmin:gpadmin ${BUILD_DESTINATION} || exit 2
116118

117-
execute_cmd sudo chown -R gpadmin:gpadmin /usr/local/cloudberry-db || exit 2
118119
log_section_end "Initial Setup"
119120

120121
# Set environment
121122
log_section "Environment Setup"
122-
export LD_LIBRARY_PATH=/usr/local/cloudberry-db/lib:LD_LIBRARY_PATH
123+
export LD_LIBRARY_PATH=${BUILD_DESTINATION}/lib:LD_LIBRARY_PATH
123124
log_section_end "Environment Setup"
124125

125126
# Add debug options if ENABLE_DEBUG is set to "true"
@@ -133,7 +134,7 @@ fi
133134

134135
# Configure build
135136
log_section "Configure"
136-
execute_cmd ./configure --prefix=/usr/local/cloudberry-db \
137+
execute_cmd ./configure --prefix=${BUILD_DESTINATION} \
137138
--disable-external-fts \
138139
--enable-gpcloud \
139140
--enable-ic-proxy \
@@ -158,7 +159,7 @@ execute_cmd ./configure --prefix=/usr/local/cloudberry-db \
158159
--with-openssl \
159160
--with-uuid=e2fs \
160161
--with-includes=/usr/local/xerces-c/include \
161-
--with-libraries=/usr/local/cloudberry-db/lib || exit 4
162+
--with-libraries=${BUILD_DESTINATION}/lib || exit 4
162163
log_section_end "Configure"
163164

164165
# Capture version information

build_automation/cloudberry/scripts/create-cloudberry-demo-cluster.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# LOG_DIR - Directory for logs (defaults to ${SRC_DIR}/build-logs)
3636
#
3737
# Prerequisites:
38-
# - Apache Cloudberry must be installed (/usr/local/cloudberry-db)
38+
# - Apache Cloudberry must be installed (${BUILD_DESTINATION})
3939
# - SSH must be configured for passwordless access to localhost
4040
# - User must have permissions to create cluster directories
4141
# - PostgreSQL client tools (psql) must be available
@@ -75,11 +75,11 @@ export LOG_DIR="${SRC_DIR}/build-logs"
7575
CLUSTER_LOG="${LOG_DIR}/cluster.log"
7676

7777
# Initialize environment
78-
init_environment "Cloudberry Demo Cluster Script" "${CLUSTER_LOG}"
78+
init_environment "Cloudberry Demo Cluster Script" "${CLUSTER_LOG}" "${BUILD_DESTINATION}"
7979

8080
# Setup environment
8181
log_section "Environment Setup"
82-
source /usr/local/cloudberry-db/greenplum_path.sh || exit 1
82+
source ${BUILD_DESTINATION}/greenplum_path.sh || exit 1
8383
log_section_end "Environment Setup"
8484

8585
# Verify SSH access

build_automation/cloudberry/scripts/destroy-cloudberry-demo-cluster.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export LOG_DIR="${SRC_DIR}/build-logs"
7171
CLUSTER_LOG="${LOG_DIR}/destroy-cluster.log"
7272

7373
# Initialize environment
74-
init_environment "Destroy Cloudberry Demo Cluster Script" "${CLUSTER_LOG}"
74+
init_environment "Destroy Cloudberry Demo Cluster Script" "${CLUSTER_LOG}" "${BUILD_DESTINATION}"
7575

7676
# Source Cloudberry environment
7777
log_section "Environment Setup"

build_automation/cloudberry/scripts/test-cloudberry.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export LOG_DIR="build-logs"
6060
TEST_LOG="${LOG_DIR}/test.log"
6161

6262
# Initialize environment
63-
init_environment "Cloudberry Test Script" "${TEST_LOG}"
63+
init_environment "Cloudberry Test Script" "${TEST_LOG}" "${BUILD_DESTINATION}"
6464

6565
# Source Cloudberry environment
6666
log_section "Environment Setup"

build_automation/cloudberry/scripts/unittest-cloudberry.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ export LOG_DIR="${SRC_DIR}/build-logs"
5252
UNITTEST_LOG="${LOG_DIR}/unittest.log"
5353

5454
# Initialize environment
55-
init_environment "Cloudberry Unittest Script" "${UNITTEST_LOG}"
55+
init_environment "Cloudberry Unittest Script" "${UNITTEST_LOG}" "${BUILD_DESTINATION}"
5656

5757
# Set environment
5858
log_section "Environment Setup"
59-
export LD_LIBRARY_PATH=/usr/local/cloudberry-db/lib:LD_LIBRARY_PATH
59+
export LD_LIBRARY_PATH=${BUILD_DESTINATION}/lib:LD_LIBRARY_PATH
6060
log_section_end "Environment Setup"
6161

6262
# Unittest process

images/docker/cbdb/build/ubuntu22.04/Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,16 @@ RUN sed -i "s/archive.ubuntu.com/mirror.yandex.ru/g" /etc/apt/sources.list && \
131131
sudo \
132132
tzdata \
133133
zlib1g-dev && \
134+
apt-get install -y -qq \
135+
ca-certificates-java \
136+
cgroup-tools \
137+
curl \
138+
debhelper \
139+
libaprutil1-dev \
140+
libcgroup1 \
141+
ninja-build \
142+
quilt \
143+
unzip && \
134144
apt-get clean && rm -rf /var/lib/apt/lists/* && \
135145
cd && GO_VERSION="go1.23.4" && \
136146
ARCH=$(uname -m) && \

0 commit comments

Comments
 (0)