- 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>
61 lines
1.8 KiB
Bash
Executable File
61 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Build an LTS DEB package for Ubuntu 26.04
|
|
# Migrated from jenkins_builder.sh (openSUSE) to Ubuntu/DEB ecosystem
|
|
#
|
|
# 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 ==="
|