Untitled

What is a Trigger?

A trigger is a rule that defines what Spaceship should do when you push new code to GitHub. Triggers match based on branch or tag patterns and can also be configured to deliver to different clusters or wait for status checks to pass. They are how you set up automation of the Spaceship platform and implement Continuous Delivery.

The Default Trigger

Untitled

By default, Spaceship sets up a trigger to match all branches (with the * pattern). This will create a build every time you push to GitHub. This trigger won't wait for status checks to pass and doesn't deliver to any of your clusters by default. The result is you should have a container image for every version of your code.

Delivering with Triggers

In addition to building container images, you can use triggers to deliver your code to your clusters. Just check the box to enable Deliver After Building and choose which cluster you wish to deliver to. You can only deliver to one cluster from a single trigger. If you want to deploy to multiple clusters, just create multiple triggers.

Untitled

Waiting for Status Checks

Status Checks are a system from GitHub that applies a status (pending, success, or failure) to each commit in your repository. While they have many applications, most commonly they are used for running tests against the code. If the tests pass, they display a green checkmark next to the commit.