Project

Profile

Help

Refactor #3296

closed

Pulp - Story #3209: As a user, I have Repository Versions

Move publish logic from Publisher model to a task

Added by amacdona@redhat.com almost 7 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Estimated time:
Platform Release:
Groomed:
No
Sprint Candidate:
Yes
Tags:
Sprint:
Sprint 31
Quarter:

Description

This task is to:

  1. Create a celery task called `publish` in pulp_file.app.tasks.py
  2. define a POST detail route called publish on FilePublisherViewset that deploys the celery task. This viewset should accept `repository` or `repository_version` as a POST body parameter. If `repository` is passed, the latest version should be determined and used as `repository_version`.

The logic defined in the task should be taken from models.FilePublisher.publish. Validation and setting the working directory from pulpcore.tasks.publisher.publish should also be added to this task.

Plugin writer needs to dispatch a task with a reservation for the repository it is publishing.

Plugin writer needs to make sure the publication is added as a created resource for the task. Look at the core publishing task for the example of that.


Related issues

Copied from File Support - Refactor #3260: Move sync logic from Importer model to a taskCLOSED - CURRENTRELEASEamacdona@redhat.com

Actions

Also available in: Atom PDF