feat: add Pulp upload scripts and pipeline integration#2570
Conversation
|
jenkins retest |
|
My comment is a nit. I'd like to push this to Jenkins to make sure we don't run over the character limit we saw a few months ago but otherwise okay with this. Exciting stuff! 👍 |
zmc
left a comment
There was a problem hiding this comment.
Generally looks great! I agree with David's suggestion. I think we should likely have PULP_URL be a parameter defaulting to the host we have in openshift.
210595f to
5cee478
Compare
93eb758 to
4bb903f
Compare
|
@vamahaja is this ready now? |
@djgalloway testing couple of scenarios, will complete it ASAP |
58c7717 to
e3299fc
Compare
Add an optional path to publish built RPM/DEB artifacts to Pulp alongside the
existing Chacra flow.
- Introduce a `PULP_UPLOAD` boolean parameter (default false) on the `ceph-dev` job.
- Add `scripts/setup_pulp.sh` to install `pulp-cli` (with pulp-cli-deb) via uv and
write client config from Jenkins credentials.
- Add `scripts/pulp_upload.sh` to upload discovered packages, attach them to the
target repository, create a publication, and publish a distribution with
project/version/ref/arch/sha labels.
- Update the Jenkinsfile to install/configure the Pulp client when forcing a
rebuild with Pulp upload while Chacra already has artifacts, and to invoke
`pulp_upload.sh` after `chacra_upload.sh` when `THROWAWAY` is not `true` and
`PULP_UPLOAD` is `true`.
Signed-off-by: Vaibhav Mahajan <vamahaja@redhat.com>
| resolve_branch_from_ceph_version() { | ||
| local branch="" | ||
| if [[ $CEPH_VERSION =~ ^21.* ]]; then | ||
| branch="main" | ||
| elif [[ $CEPH_VERSION =~ ^20.* ]]; then | ||
| branch="tentacle" | ||
| elif [[ $CEPH_VERSION =~ ^19.* ]]; then | ||
| branch="squid" | ||
| elif [[ $CEPH_VERSION =~ ^18.* ]]; then | ||
| branch="reef" | ||
| elif [[ $CEPH_VERSION =~ ^17.* ]]; then | ||
| branch="quincy" | ||
| elif [[ $CEPH_VERSION =~ ^16.* ]]; then | ||
| branch="pacific" | ||
| else | ||
| log "ERROR: Unsupported Ceph version '${CEPH_VERSION}'" \ | ||
| "(expected 16.x–20.x for branch mapping)" | ||
| exit 1 | ||
| fi | ||
| printf '%s\n' "$branch" | ||
| } |
There was a problem hiding this comment.
Is it possible to reuse https://github.com/ceph/ceph-build/blob/main/scripts/build_utils.sh#L13-L78? Having another distro map hard coded somewhere is not scalable.
There was a problem hiding this comment.
Maybe we ought to drop a yaml or json file in, say, the repo root for this
This PR will introduce an optional path to publish built RPM/DEB artifacts to Pulp alongside the existing Chacra flow.
PULP_UPLOADboolean parameter (default false) on theceph-devjob.scripts/setup_pulp.shto installpulp-cli(with pulp-cli-deb) via uv and write client config from Jenkins credentials.scripts/pulp_upload.shto upload discovered packages, attach them to the target repository, create a publication, and publish a distribution with project/version/ref/arch/sha labels.pulp_upload.shafterchacra_upload.shwhenTHROWAWAYis nottrueandPULP_UPLOADistrue.