Skip to content

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

License

Notifications You must be signed in to change notification settings

tiwalter/release-server

 
 

Repository files navigation

Build Status

Release server

An application for managing your own release artifacts. The release server provides several REST endpoints for the following operations:

  • Upload the release artifacts
  • Download the release artifacts
  • Get information about the release artifacts (e.g. which version is the latest etc.)

Setup

You have two options to setup the release server.

Run with Docker-compose

  1. Download the docker-compose.yml and put it in a directory of your choice.

  2. Download the appsettings.json from the configuration examples and put it in the same directory of 1.

  3. Replace the placeholder in the "Credentials" object in the appsettings.json with your own username and base64 encoded password.

  4. Run the application with docker-compose: docker-compose -f "docker-compose.yml" up -d --build

Now, the release server is reachable at https://localhost:5001. The Swagger UI can be found at https://localhost:5001/swagger.

Run with Docker

  1. Pull the Docker image: docker pull traeger/release-server:latest

  2. Download the appsettings.json from the configuration examples and put it into a directory of your choice.

  3. Replace the placeholder in the "Credentials" object in the appsettings.json with your own username and base64 encoded password.

  4. Run the application with docker run: docker run -d -v <path_to_your_directory>/appsettings.json:/app/appsettings.json -v <path_to_your_directory>/artifacts:/app/artifacts -p 5001:5001 traeger/release-server:latest

    Note: You have to replace the placeholder of the docker run command!

Now, the release server is reachable at https://localhost:5001. The Swagger UI can be found at https://localhost:5001/swagger.

Usage

The first two REST endpoint examples are documented above.

For more information about the other endpoints and their usage, read the Swagger documentation .

Upload an Artifact

Structure of the artifact payload: The payload has to be a zip file and has to contain the following elements:

  • the artifact itself (exe, zip or something else)
  • the meta information in form of the deployment.json
  • a changelog

You can find an example artifact payload in form of a zip file here: Example artifact payload

PUT request to upload an artifact:

curl -k -X PUT https://localhost:5001/releaseartifact/upload/<your_prodcut_name>/debian/amd64/1.0 -H 'Authorization: Basic <base 64 encoded "username:password">' -H 'content-type: multipart/form-data' -F =@/path/to/the/artifactPayload

Note: You have replace the placeholder in the PUT request (product name, authorization header)

Response example:

Status: 200 OK Message: Upload of the artifact successful!

List all available products

GET request to list the products:

curl -k -X GET https://localhost:5001/releaseartifact/versions/<your_product_name>

Response example:

{
    "productInformation": [
        {
            "identifier": "softwareX",
            "version": "1.0",
            "os": "debian",
            "architecture": "amd64"
        },
        {
            "identifier": "softwareX",
            "version": "1.1-beta",
            "os": "debian",
            "architecture": "amd64"
        }
    ]
}

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.4%
  • Dockerfile 0.6%