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 identifierapp_id
- The ID of the application to release a new version forrelease_version
- The version tag for this releasecontent_type
- The content type of the data being uploadeddata
- The data stream of the artifact being uploadeddb_manager
- Database manager for accessing platform-specific pools
§Returns
Status::Ok
- If the artifact is successfully uploaded and added to the build jobs listStatus::BadRequest
- If there is an error in the upload process
§Details
This route handles the release of a new version of an application by:
- Uploading the provided artifact to the build artifacts list.
- 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.