class WarpEngine::PublishService
Publishes a CI upload: hands it to the platform’s service, which writes the catalog records, and announces the result.
Constants
- NOTIFICATION
-
The ActiveSupport::Notifications event instrumented after every publish, with
platform,name,version,softwareandreleasein the payload.
Public Instance Methods
Source
# File app/services/warp_engine/publish_service.rb, line 22 def publish(input) refuse_stale!(input) release = WarpEngine::Platform.find!(input.platform).service.update(input.name, input.version) ActiveSupport::Notifications.instrument( NOTIFICATION, platform: input.platform, name: input.name, version: input.version, software: release.respond_to?(:software) ? release.software : nil, release: release ) release end
Publishes the upload described by input (a WarpEngine::PublishInputDto with platform, name and version) through the platform service’s update, then instruments NOTIFICATION.
Returns the WarpEngine::Release. Raises StaleVersionError when the version is older than the newest one published, ArgumentError for an unknown platform, and WarpEngine::Platforms::MissingAssetsError when a required asset was not uploaded.