Traeger-GmbH / release-server

An server application for managing your own release artifacts via a REST API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consolidate the deployments of one version

f-porter opened this issue · comments

Problem description

Currently every deployment for a release of a product - so to say one specific version for a specific operating system and architecture combination - represents an individual entity with its own release notes.

This allows release notes to differ between platforms while they usually are expected to be not platform but version specific.
On the other hand the result a client receives when it queries the versions of a product contains a separate entry for each deployment available. This leads to a blown up response object that provides redundant information.

Solution

The deployments of a single version of a product shall be consolidated as a release.
This release will comprise the release notes together with other meta information of the package and the corresponding deployments of this release. Uploading a package will therefore require the payload to contain all this data.

Necessary steps

  • the payload uploaded to the server will be called Package
    • .zip archive that contains the following:
      • package.json: JSON file that provides the package information
        • product identifier
        • version
        • release notes
        • included platform deployments
      • deployment files according to platforms
  • refactor the Upload endpoint to take the new Package format and store it accordingly
  • refactor the object model to represent the new structure
    • new class PackageInformation representing package.json
    • new class ReleaseInformation representing a release/product version
  • refactor the repository to store the packages in the following structure in order to enable a single release notes file for one version:
      version/
        releaseNotes.json
        operatingSystem1/
          arch1/
            deploymentFile_1-1
          arch2/
            deploymentFile_1-2
          ...
        operatingSystem2/
          arch1/
            deploymentFile_2-1
          arch2/
            deploymentFile_2-2
          ...
        ...
    
  • add examples

Due to time restrictions we perform the repository refactoring in a future step in addition to refactoring the unit tests.