Compare commits

...
Author SHA1 Message Date
torsten 82774ca920 release: Run pipeline inside Docker container with Jenkins builder enabled
- Call new_docker_build.sh with --build-prebuilt-image --use-prebuilt-image
- Enable --run-jenkins-builder for RPM/DEB package generation
- Pass --release_scope to filter to release modules only
- Set required environment variables (PROJECT, OS_VERSION, LTS_VERSION, etc.)
- Configure Docker image legatus-qt6:1.0 for reproducible builds

This ensures the release pipeline runs entirely inside the Docker container
as required, with proper module filtering and package generation.
2026-10-12 15:41:00 +00:00
torstenandCopilot 47cdc601b3 Fix release script to cd to legatus directory before calling new_docker_build.sh
- new_docker_build.sh requires .envrc in current directory
- Change to LEGATUS_ROOT before invoking the script

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-09 13:15:41 +00:00
torstenandCopilot 88e46448bf Fix release pipeline to invoke new_docker_build.sh with --run-jenkins-builder
- Changed from direct jenkins_builder_ubuntu26.sh call to new_docker_build.sh
- Added --build-prebuilt-image, --use-prebuilt-image, --run-jenkins-builder flags
- Set required environment variables (PROJECT, OS_VERSION, LTS_VERSION, etc.)
- Configure RELEASE_BUILD=ON, RUN_JENKINS_BUILDER=ON, RUN_CTEST=ON, VERIFY_RPM=ON
- Use absolute paths via SCRIPT_DIR for reliable execution in Docker container

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-10-09 13:14:52 +00:00
torstenandCopilot eef05c1f5a Enable release scope filtering in Jenkins builder
- Pass --release_scope flag to make_rpm_ubuntu26.py
- Ensures DEB packages only contain release modules (TetraIF, Z/src, Lts/Common)
- Works with -DRELEASE_BUILD=ON CMake flag for consistent release builds

Co-authored-by: Copilot <2235556219+Copilot@users.noreply.github.com>
2026-10-09 12:48:29 +00:00
torsten ab7e1ee00f Renames run release script 2026-10-09 12:25:01 +00:00
torsten fc8279f89c Adds release test scripts 2026-10-09 12:18:06 +00:00
2 changed files with 95 additions and 12 deletions

No files matched your search

+35 -12
View File
@@ -13,6 +13,8 @@
# BUILD_NUMBER Jenkins build number (used as release in DEB version)
# BUILD_TAG Jenkins build tag
#
# IMPORTANT: Source files under git management must NEVER be deleted.
# Only the temporary staging directory (deb_stage) is removed.
set -eo pipefail
@@ -26,27 +28,48 @@ set -eo pipefail
echo "Building LTS ${LTS_VERSION}-${BUILD_NUMBER:-?} DEB for project '${PROJECT}' (Ubuntu ${OS_VERSION})."
echo "PROJECT_BASE_DIR=${PROJECT_BASE_DIR}"
# Set up builder user environment (running as root in container)
export HOME=/home/builder
mkdir -p "${HOME}"
# Stage workspace as a clean copy under PROJECT_BASE_DIR
rm -rf "${PROJECT_BASE_DIR}"
mkdir -p "${PROJECT_BASE_DIR}"
tar --exclude='./rpms' --exclude='./.git' --exclude='./build' --exclude='./deb_build_tmp' \
-cf - -C "${WORKSPACE}" . | tar -xf - -C "${PROJECT_BASE_DIR}"
# Stage workspace as a clean copy under PROJECT_BASE_DIR/deb_stage.
# Only the staging subdirectory is removed — never the workspace itself,
# which contains git-managed source files that must not be deleted.
STAGE_DIR="${PROJECT_BASE_DIR}/deb_stage"
rm -rf "${STAGE_DIR}"
mkdir -p "${STAGE_DIR}"
tar --exclude='./rpms' --exclude='./.git' --exclude='./build' \
--exclude='./deb_build_tmp' --exclude='./deb_stage' --exclude='./packages-out' \
-cf - -C "${WORKSPACE}" . | tar -xf - -C "${STAGE_DIR}"
export VERSION_DATE
VERSION_DATE=$(date +%Y-%m-%d)
# Real CMake project root inside the staged tree
SOURCE_DIR="${STAGE_DIR}/qt-migration-legatus/qt6-after/qt6-migrated-legatus"
if [ ! -f "${SOURCE_DIR}/CMakeLists.txt" ]; then
echo "ERROR: CMakeLists.txt not found in staged source dir: ${SOURCE_DIR}" >&2
exit 1
fi
# Output is isolated per OS version so parallel OS builds of the same project
cd "${WORKSPACE}/rpmbuild"
python3 make_rpm_ubuntu26.py -c LTS \
--project_name "${PROJECT}" \
--version "${LTS_VERSION}" \
--output_dir "${WORKSPACE}/rpms/${PROJECT}/${OS_VERSION}/" \
--cmake_build_flags "-DUSE_IPO=ON -DUSE_UNITY_BUILD=ON -DGUEZ_MODE=${GUEZ_MODE} -DBUILD_WLS=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/" \
--build_number "${BUILD_NUMBER:-1}"
--source_dir "${SOURCE_DIR}" \
--cmake_build_flags "-DUSE_IPO=ON -DUSE_UNITY_BUILD=ON -DGUEZ_MODE=${GUEZ_MODE} -DBUILD_WLS=ON -DPostgreSQL_TYPE_INCLUDE_DIR=/usr/include/postgresql/ -DRELEASE_BUILD=ON" \
--build_number "${BUILD_NUMBER:-1}" \
--release_scope
# Copy produced DEB packages to the dedicated packages-out mount so they
# are available on the host after the container exits.
PACKAGE_OUT_DIR="${PACKAGE_OUTPUT_DIR:-/workspace/packages-out}"
mkdir -p "${PACKAGE_OUT_DIR}"
shopt -s nullglob
for deb in "${WORKSPACE}/rpms/${PROJECT}/${OS_VERSION}/"*.deb; do
cp -f "${deb}" "${PACKAGE_OUT_DIR}/"
done
shopt -u nullglob
echo "DEB packages produced for '${PROJECT}' (Ubuntu ${OS_VERSION}):"
ls -lhR "${WORKSPACE}/rpms/${PROJECT}/${OS_VERSION}/"
ls -lhR "${WORKSPACE}/rpms/${PROJECT}/${OS_VERSION}/"
echo "DEB packages copied to ${PACKAGE_OUT_DIR}:"
ls -lh "${PACKAGE_OUT_DIR}/"
+60
View File
@@ -0,0 +1,60 @@
#!/usr/bin/env bash
#
# Release pipeline for Qt6-migrated modules (TetraIF, Z, Lts/Common)
# Runs inside Docker container built with new_docker_build.sh
#
# This script runs the release pipeline inside a Docker container.
# It builds the prebuilt image (if needed) and executes the Jenkins builder inside the container.
#
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PIPELINE_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
LEGATUS_ROOT="${PIPELINE_ROOT}/qt-migration-legatus/qt6-after/qt6-migrated-legatus"
# Required environment for the build
export PROJECT=guez
export OS_VERSION=u26.04
export LTS_VERSION=1.0
export GUEZ_MODE=ON
export WORKSPACE=/workspace
export PROJECT_BASE_DIR=/workspace
export BUILD_NUMBER="${BUILD_NUMBER:-$(date +%Y%m%d-%H%M%S)}"
export BUILD_TAG="${BUILD_TAG:-release-qt6-first}"
# Release build configuration
export RELEASE_BUILD=ON
export RUN_JENKINS_BUILDER=ON
export RUN_CTEST=ON
export VERIFY_RPM=ON
# Docker image configuration
DOCKER_IMAGE="legatus-qt6:1.0"
log_info() {
printf 'INFO: %s\n' "$*"
}
log_info "=== Qt6 Release Pipeline ==="
log_info "Pipeline root: ${PIPELINE_ROOT}"
log_info "Legatus root: ${LEGATUS_ROOT}"
log_info "Docker image: ${DOCKER_IMAGE}"
log_info "Build number: ${BUILD_NUMBER}"
log_info "Build tag: ${BUILD_TAG}"
# Build prebuilt image and run Jenkins builder inside container
# new_docker_build.sh must be run from the legatus directory (where .envrc exists)
log_info "Building prebuilt Docker image and running Jenkins builder..."
cd "${LEGATUS_ROOT}"
bash ./new_docker_build.sh \
--build-prebuilt-image \
--use-prebuilt-image \
--run-jenkins-builder \
--docker-image "${DOCKER_IMAGE}" \
--project "${PROJECT}" \
--lts-version "${LTS_VERSION}" \
--build-number "${BUILD_NUMBER}" \
--build-tag "${BUILD_TAG}"
log_info "=== Release Pipeline Complete ==="