Copy jenkins-ci-rme into the source tree and adapt it to this project
- Jenkinsfile: guez-only release pipeline; the prebuilt build image is
built from the in-tree Dockerfile (via new_docker_build.sh
--build-prebuilt-image) instead of a pre-pulled harbor image; the
builder runs inside the container with the workspace mounted at
/workspace; the post-publish cleanup stage was dropped so the DEBs
stay under ${WORKSPACE}/rpms/... (the documented output location)
- jenkins_builder_ubuntu26.sh: uses the in-tree rpmbuild/
make_rpm_ubuntu26.py instead of the outer-repo copy; same-file guard
on the packages-out copy (host output dir == make_rpm output dir)
- jenkins_publisher_ubuntu26.sh: uploads rpms/${PROJECT}/${OS_VERSION}/
directly - make_rpm_ubuntu26.py writes the DEBs there without a TDS
subfolder
- release-16-10-2026.sh: local driver adapted to the current
new_docker_build.sh interface (drops the no-longer-existing
--use-prebuilt-image option, builds the image on demand, outputs to
${WORKSPACE}/rpms/${PROJECT}/${OS_VERSION}/)
- make_rpm_ubuntu26.py: stage the new jenkins-ci-rme/ files (Jenkinsfile,
builder, publisher) into the build-pipeline DEB (release-16-10-2026.sh
was already listed)
Not copied (superseded): openSUSE builder/publisher, the old Dockerfile
recipes (replaced by the in-tree Dockerfile), Bitbucket notification
(jenkins_notifier.sh is not part of this project)
This commit is contained in:
1 parent
bf3fecf5c0
commit
2d1b12b5d8
6 files changed
+426
No files matched your search
+71
@@ -0,0 +1,71 @@
|
||||
#!/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.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"
|
||||
Reference in new issue
Block a user