]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
pulp_upload.sh: use the rpm arch for the repository handoff lookup
authorDavid Galloway <david.galloway@ibm.com>
Thu, 9 Jul 2026 16:28:25 +0000 (12:28 -0400)
committerDavid Galloway <david.galloway@ibm.com>
Thu, 9 Jul 2026 19:08:05 +0000 (15:08 -0400)
The final `pulp repository show --name ${REPO_NAME}-${ARCH}` uses the
Jenkins matrix arch (arm64), but rpm repositories are created per rpm
arch (aarch64) by the upload loop.  For arm64 rpm builds the lookup
fails after all uploads succeeded and, under set -e, kills the script,
failing the stage.

Signed-off-by: David Galloway <david.galloway@ibm.com>
scripts/pulp_upload.sh

index 68e1e1c1433342f96a4399a478aba3e48afca7b5..38c39d8fcd85403f6c4b74cb03b2deb39243c0ca 100755 (executable)
@@ -539,8 +539,14 @@ fi
 # separate process. PACKAGE_MANAGER_VERSION is included in the repo
 # record's extra metadata; the repository's API URL becomes the record's
 # chacra_url. See notify_shaman_pulp_repo.sh.
+# rpm repositories are named after the rpm arch (aarch64), not the Jenkins
+# matrix arch (arm64); see the SRPMS/noarch/aarch64/x86_64 loop above.
+_repo_arch="${ARCH}"
+if [ "$OS_PKG_TYPE" = "rpm" ] && [ "$ARCH" = "arm64" ]; then
+    _repo_arch="aarch64"
+fi
 _repo_href=$(pulp "${OS_PKG_TYPE}" repository show \
-    --name "${REPO_NAME}-${ARCH}" | jq -r '.pulp_href')
+    --name "${REPO_NAME}-${_repo_arch}" | jq -r '.pulp_href')
 {
     printf 'PACKAGE_MANAGER_VERSION=%q\n' "${PACKAGE_MANAGER_VERSION}"
     printf 'PULP_REPO_API_URL=%q\n' "${PULP_SERVER_URL}${_repo_href}"