Skip to content

feat: add Pulp upload scripts and pipeline integration#2570

Open
vamahaja wants to merge 1 commit intomainfrom
upload-to-pulp
Open

feat: add Pulp upload scripts and pipeline integration#2570
vamahaja wants to merge 1 commit intomainfrom
upload-to-pulp

Conversation

@vamahaja
Copy link
Copy Markdown
Member

This PR will introduce 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.

@vamahaja vamahaja requested review from tchaikov and zmc April 23, 2026 16:41
Comment on lines +600 to +608
export PULP_URL="${PULP_URL}"
export PULP_PROJECT="${PULP_PROJECT}"
export OS_NAME="${os.name}"
export OS_VERSION="${os.version}"
export OS_VERSION_NAME="${os.version_name}"
export OS_PKG_TYPE="${os.pkg_type}"
export SHA1="${env.SHA1}"
export FLAVOR="${env.FLAVOR}"
if [ "$THROWAWAY" != "true" && "$PULP_UPLOAD" == "true" ]; then ./scripts/pulp_upload.sh; fi
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't all of the exports go inside the if statement at the end? The only reason we export CHACRA_URL and subsequent vars above is because we use chacra unconditionally.

So

if [ "$THROWAWAY" != "true" && "$PULP_UPLOAD" == "true" ]; then
  export PULP_PROJECT="${PULP_PROJECT}"
  export OS_NAME="${os.name}"
  export OS_VERSION="${os.version}"
  export OS_VERSION_NAME="${os.version_name}"
  export OS_PKG_TYPE="${os.pkg_type}"
  export SHA1="${env.SHA1}"
  export FLAVOR="${env.FLAVOR}"
  ./scripts/pulp_upload.sh
else
  echo "Skipping pulp upload because PULP_UPLOAD=$PULP_UPLOAD"
fi

Or similar

@djgalloway
Copy link
Copy Markdown
Contributor

jenkins retest

@djgalloway
Copy link
Copy Markdown
Contributor

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! 👍

Copy link
Copy Markdown
Member

@zmc zmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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>

Signed-off-by: Vaibhav Mahajan <vamahaja@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants