Shipper is a continuous deployment tool that leverages GitHub's Deployments API to allow secure asynchronous deployments.
A shipper daemon polls the Github Deployments API for new deployments on a given environment. When a new deployment is found it follows these steps:
- Creates a "pending" Github Deployment Status
- Checks out the code into a "versioned" folder
- Runs the "Before Symlink" steps
- Creates a symbolic link called
current
to the new check out - Runs the "After Symlink" steps
- Creates a "success" Github Deployment Status
Here is a diagram of how the whole system might look like:
A configuration file is required to set up shipper. It uses the YAML format and it should contain the following parameters:
git_url
: The url of the Github repositoryenvironment
: The environment the daemon should check for new deploymentsapp_path
: Path of the applicationserver_id
: A unique ID for the serverbefore_symlink
: Array of commands to run before the symlinkafter_symlink
: Array of commands to run after the symlinkshared_files
: A list of shared files to be symlinkedkeep_revisions
: Revisions to keep when getting onesinterval
: Interval between API checks in seconds
A GH_KEY
environment variable with a Github Oauth Token is currently required to run shipper.
This requirement will be removed for the monitor.
Setup the folder structure within the app_path
. It creates a releases
and a shared
folder.
shipper setup -c shipper.yml
Crease a new deployment in the Github API. A ref
is required.
shipper new -c shipper.yml --ref master
Run the process that continuously monitors for new deployments.
shipper run -c shipper.yml
Run a manual deployment, if it exists.
shipper deploy -c shipper.yml