pulp / pulp-cli

https://docs.pulpproject.org/pulp_cli/
GNU General Public License v2.0
33 stars 41 forks source link

Added --directory to `rpm content -t package upload`. #1003

Open ggainey opened 1 week ago

ggainey commented 1 week ago

This finds all *.rpm in the specified directory and arranges for them to be added to the specified --repository, and then publishes the final resulting repository-version.

closes #994.

ggainey commented 1 week ago

This is a modification of the approach in https://github.com/pulp/pulp-cli/pull/1000 that does not rely on creating a tmp-repository.

ggainey commented 1 week ago

Sample output:

$ pulp rpm content upload --directory ./signed/fixtures.pulpproject.org/rpm-signed/ --repository rpm:rpm:upload
[About to upload 35 files for upload.
Started background task /pulp/api/v3/tasks/01905b60-998f-7997-b947-d8145e8800ab/
Done.
Uploaded ./signed/fixtures.pulpproject.org/rpm-signed/crow-0.8-1.noarch.rpm...
...
Created new version 35 in upload
Publishing repository upload.
Started background task /pulp/api/v3/tasks/01905b61-58ff-7909-81ef-84cd74d8b42f/
Done.
{
  "pulp_href": "/pulp/api/v3/publications/rpm/rpm/01905b61-5958-7670-9d88-9b486ec25d8b/",
  "pulp_created": "2024-06-27T20:27:04.921566Z",
  "pulp_last_updated": "2024-06-27T20:27:05.132778Z",
  "repository_version": "/pulp/api/v3/repositories/rpm/rpm/01905b60-7c70-75d6-8882-0ec1a29fa71d/versions/35/",
  "repository": "/pulp/api/v3/repositories/rpm/rpm/01905b60-7c70-75d6-8882-0ec1a29fa71d/",
  "checksum_type": "sha256",
  "metadata_checksum_type": "sha256",
  "package_checksum_type": "sha256",
  "gpgcheck": null,
  "repo_gpgcheck": null,
  "sqlite_metadata": false,
  "repo_config": {},
  "compression_type": null
}
ggainey commented 6 days ago

List of REST API calls made in response to using this PR to upload a directory containing one RPM:

mdellweg commented 6 days ago

Uploads api's are only employed when the file is bigger than the specified chunk size. Please try another run with chunksize 2/3 the file size.