Function release

Source
pub async fn release(
    platform_id: i64,
    app_id: String,
    release_version: String,
    content_type: &ContentType,
    data: Data<'_>,
    db_manager: &State<Arc<DatabaseManager>>,
) -> Result<Status, Status>
Expand description

Releases a new version of the target application by uploading an artifact. TODO: @tristanpoland Review if we actually need this or should drop in favor of using the deploy route.

§Arguments

  • platform_id - Platform identifier
  • app_id - The ID of the application to release a new version for
  • release_version - The version tag for this release
  • content_type - The content type of the data being uploaded
  • data - The data stream of the artifact being uploaded
  • db_manager - Database manager for accessing platform-specific pools

§Returns

  • Status::Ok - If the artifact is successfully uploaded and added to the build jobs list
  • Status::BadRequest - If there is an error in the upload process

§Details

This route handles the release of a new version of an application by:

  1. Uploading the provided artifact to the build artifacts list.
  2. Adding the artifact to the list of build jobs for the Forge instances to pick up and process.

The actual implementation of the release process is delegated to the helpers::release::release function, as it is quite extensive.