What is a Delivery?

Once you've run a build and created a container image on the Magic Container Registry, a delivery is how that image is run on your clusters. Every delivery connects a single build with a single cluster.

Deliveries are created by triggers. When a trigger matches a branch and has the deliver option checked, it will create a delivery alongside the build. The delivery will track the overall progress of the build and its journey to the cluster.

The Delivery Process

Untitled

After a matching trigger creates a delivery, it will either start a build or wait for Status Checks to pass on GitHub, depending on the trigger configuration. Once both the build is complete and the Status Checks pass, it will send the delivery to the cluster agent to apply the container image.

Identifying Deployments by Kubernetes Label

In order for the agent to know which Deployments in your cluster should be targeted for delivery, you can apply a label to the Deployment. This label is found on your app's Triggers page and is in the form: onspaceship.com/app-id: $APP_ID To apply this, add it under the metadata.labels section of your Deployment like so:

metadata:
  labels:
    onspaceship.com/app-id: $APP_ID

You can apply this label to multiple Deployments to target different running instances of your application (for instance, a web server and background job runner). The label can be applied to any Deployment in any Namespace in your cluster.

Running Release Jobs