22# vim: ts=4 sw=4 expandtab
33
44# repo auth with write perms must be present (this script does not log into
5- # CONTAINER_REPO_HOSTNAME and CONTAINER_REPO_ORGANIZATION ).
5+ # repos named by CONTAINER_REPO_* ).
66# If NO_PUSH is set, no login is necessary
77
88
@@ -20,6 +20,7 @@ CEPH_SHA1 (of Ceph)
2020ARCH (of build host, and resulting container)
2121CONTAINER_REPO_HOSTNAME (quay.ceph.io, for CI, for instance)
2222CONTAINER_REPO_ORGANIZATION (ceph-ci, for CI, for instance)
23+ CONTAINER_REPO (ceph, for CI, or prerelease-<arch> for release, for instance)
2324CONTAINER_REPO_USERNAME
2425CONTAINER_REPO_PASSWORD
2526PRERELEASE_USERNAME for download.ceph.com:/prerelease/ceph
5051
5152if [[ ${CI_CONTAINER} == " true" ]] ; then
5253 CONTAINER_REPO_HOSTNAME=${CONTAINER_REPO_HOSTNAME:- quay.ceph.io}
53- CONTAINER_REPO_ORGANIZATION=${CONTAINER_REPO_ORGANIZATION:- ceph-ci/ ceph}
54+ CONTAINER_REPO_ORGANIZATION=${CONTAINER_REPO_ORGANIZATION:- ceph-ci}
55+ CONTAINER_REPO=${CONTAINER_REPO:- ceph}
5456else
5557 CONTAINER_REPO_HOSTNAME=${CONTAINER_REPO_HOSTNAME:- quay.ceph.io}
56- CONTAINER_REPO_ORGANIZATION=${CONTAINER_REPO_ORGANIZATION:- ceph/ prerelease-${REPO_ARCH} }
58+ CONTAINER_REPO_ORGANIZATION=${CONTAINER_REPO_ORGANIZATION:- ceph}
59+ CONTAINER_REPO=${CONTAINER_REPO:- prerelease-${REPO_ARCH} }
5760 # default: most-recent annotated tag
5861 VERSION=${VERSION:- $(git describe --abbrev=0)}
5962fi
7174if [[ ${CI_CONTAINER} != " true" ]] ; then : " ${VERSION:? } " ; fi
7275
7376# check for valid repo auth (if pushing)
74- ORGURL =${CONTAINER_REPO_HOSTNAME} /${CONTAINER_REPO_ORGANIZATION}
75- MINIMAL_IMAGE=${ORGURL} /ceph :minimal-test
77+ repopath =${CONTAINER_REPO_HOSTNAME} /${CONTAINER_REPO_ORGANIZATION} / ${CONTAINER_REPO }
78+ MINIMAL_IMAGE=${repopath} :minimal-test
7679if [[ ${NO_PUSH} != " true" ]] ; then
7780 podman rmi ${MINIMAL_IMAGE} || true
7881 echo " FROM scratch" | podman build -f - -t ${MINIMAL_IMAGE}
7982 if ! podman push ${MINIMAL_IMAGE} ; then
80- echo " Not authenticated to ${ORGURL } ; need docker/podman login?"
83+ echo " Not authenticated to ${repopath } ; need docker/podman login?"
8184 exit 1
8285 fi
8386 podman rmi ${MINIMAL_IMAGE} | true
@@ -145,14 +148,14 @@ fromtag=${fromtag/:/-}
145148builddate=$( date -u +%Y%m%d)
146149local_tag=${fromtag} -${CEPH_CONTAINER_CEPH_REF} -${CEPH_CONTAINER_ARCH} -${builddate}
147150
148- repopath=${CONTAINER_REPO_HOSTNAME} /${CONTAINER_REPO_ORGANIZATION}
151+ repopath=${CONTAINER_REPO_HOSTNAME} /${CONTAINER_REPO_ORGANIZATION} / ${CONTAINER_REPO}
149152
150153if [[ ${CI_CONTAINER} == " true" ]] ; then
151154 # ceph-ci conventions for remote tags:
152155 # requires ARCH, BRANCH, CEPH_SHA1, FLAVOR
153- full_repo_tag=$repopath /ceph :${BRANCH} -${fromtag} -${ARCH} -devel
154- branch_repo_tag=$repopath /ceph :${BRANCH}
155- sha1_repo_tag=$repopath /ceph :${CEPH_SHA1}
156+ full_repo_tag=${ repopath} :${BRANCH} -${fromtag} -${ARCH} -devel
157+ branch_repo_tag=${ repopath} :${BRANCH}
158+ sha1_repo_tag=${ repopath} :${CEPH_SHA1}
156159
157160 if [[ " ${ARCH} " == " arm64" ]] ; then
158161 branch_repo_tag=${branch_repo_tag} -arm64
182185 # non-CI build. Tags are like v19.1.0-20240701
183186 # push to quay.ceph.io/ceph/prerelease-$REPO_ARCH
184187 #
185- version_tag=${repopath} /prerelease- ${REPO_ARCH} :v${VERSION} -${builddate}
188+ version_tag=${repopath} :v${VERSION} -${builddate}
186189
187190 podman tag ${image_id} ${version_tag}
188191 if [[ -z " ${NO_PUSH} " ]] ; then
0 commit comments