Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/jenkins-ci-rme/jenkins_publisher_ubuntu26.sh
T
berrux-dev 2b1c3dc241 Remove the Release 1 pipeline files; point everything at Release 2
new_docker_build.sh and rpmbuild/make_rpm_ubuntu26.py (Release 1
validation-scope driver/producer) did not belong to this branch; their
functional callers are adapted to the Release 2 files:

- rpmbuild/make_rpm_ubuntu26_release2.py: PIPELINE_FILES now packages
  new_docker_build_release2.sh and make_rpm_ubuntu26_release2.py.
- jenkins-ci-rme/jenkins_builder_ubuntu26.sh: runs
  make_rpm_ubuntu26_release2.py with -DBUILD_RTI=ON and the Release 2
  target list (--build_targets; a full-tree build is not possible on
  this tree); staging tar also excludes ./build4*.
- jenkins-ci-rme/release-16-10-2026.sh (local dry run): calls
  new_docker_build_release2.sh; derives the pipeline root from the tree
  layout and exports MIGRATE_PIPELINE_ROOT; uses the prebuilt image when
  present, otherwise the driver installs deps in-container (the R1
  --build-prebuilt-image option does not exist in the R2 driver).
- jenkins-ci-rme/jenkins/Jenkinsfile: coverage stage runs the R2 driver
  with MIGRATE_PIPELINE_ROOT exported (wins over the checked-in .envrc,
  which carries a host-specific path).
- Doc/comment updates: Dockerfile header, install_arcgis.sh, publisher,
  Jenkinsfile descriptions, jenkins-ci-rme/README.md, README.md.

Remaining references to the old names are only in historical migration
reports, which are left as-is.
2026-11-13 21:13:13 +01:00

72 lines
2.9 KiB
Bash

#!/usr/bin/env bash
#
# Upload the produced DEBs to the internal artifact repository and emit two
# helper files for the Jenkinsfile to consume (named per project + OS
# version):
# ${WORKSPACE}/url-${PROJECT}-${OS_VERSION}.txt — browseable URL of the uploaded folder
# ${WORKSPACE}/tdsversion-${PROJECT}-${OS_VERSION}.txt — full version string (LTS-build)
#
# Adapted for the in-tree flow: make_rpm_ubuntu26_release2.py writes the DEBs
# directly under ${WORKSPACE}/rpms/${PROJECT}/${OS_VERSION}/ (no TDS
# subfolder), so that directory is uploaded as-is.
#
# Required environment (set by the Jenkinsfile / withCredentials):
# PROJECT LTS flavor: guez
# OS_VERSION Ubuntu base version, e.g. 26.04
# LTS_VERSION Major.minor LTS version, e.g. 1.0
# BUILD_NUMBER Build number (release component of the artifact name)
# WORKSPACE Jenkins workspace path
# ARTIFACTREPO Base URL of the internal repo (no trailing slash)
# ARTIFACTFOLDER Subfolder under cts-rpms/ (project name, e.g. guez)
# CURL_CRED user:password for the upload (Jenkins credential)
#
set -eo pipefail
: "${PROJECT:?PROJECT must be set}"
: "${OS_VERSION:?OS_VERSION must be set}"
: "${LTS_VERSION:?LTS_VERSION must be set}"
: "${BUILD_NUMBER:?BUILD_NUMBER must be set}"
: "${WORKSPACE:?WORKSPACE must be set}"
: "${ARTIFACTREPO:?ARTIFACTREPO must be set}"
: "${ARTIFACTFOLDER:?ARTIFACTFOLDER must be set}"
: "${CURL_CRED:?CURL_CRED must be set}"
tds_folder_name="${PROJECT}-TDS-${LTS_VERSION}-${BUILD_NUMBER}"
tds_folder_path="${WORKSPACE}/rpms/${PROJECT}/${OS_VERSION}"
tds_artifact_store="${ARTIFACTREPO}/repository/cts-rpms/${ARTIFACTFOLDER}/${OS_VERSION}/${tds_folder_name}"
if [ ! -d "${tds_folder_path}" ]; then
echo "ERROR: expected package folder not found: ${tds_folder_path}" >&2
exit 1
fi
shopt -s nullglob
uploaded=0
for file in "${tds_folder_path}"/*; do
[ -f "${file}" ] || continue
# Upload .deb, .dsc, .changes, .buildinfo files
if [[ "${file}" == *.deb ]] || [[ "${file}" == *.dsc ]] || [[ "${file}" == *.changes ]] || [[ "${file}" == *.buildinfo ]]; then
name=$(basename "${file}")
echo "Uploading: ${name}"
curl --fail --silent --show-error \
--user "${CURL_CRED}" \
--upload-file "${file}" \
"${tds_artifact_store}/${name}"
uploaded=$((uploaded + 1))
fi
done
shopt -u nullglob
if [ "${uploaded}" -eq 0 ]; then
echo "ERROR: no files uploaded from ${tds_folder_path}" >&2
exit 1
fi
echo "Uploaded ${uploaded} file(s) to ${tds_artifact_store}/"
# Per-(project, OS) filenames so concurrent publish stages don't clobber each
# other's helper files; the Jenkinsfile reads back the matching names.
echo "${ARTIFACTREPO}/service/rest/repository/browse/cts-rpms/${ARTIFACTFOLDER}/${OS_VERSION}/${tds_folder_name}/" > "${WORKSPACE}/url-${PROJECT}-${OS_VERSION}.txt"
echo "${LTS_VERSION}-${BUILD_NUMBER}" > "${WORKSPACE}/tdsversion-${PROJECT}-${OS_VERSION}.txt"