Skip to main content

Barebones Quick Setup

If you use Github actions to deploy we have an action to make this easier. See the Github Action on Marketplace for more information.

If you deploy another way the simplest way to get setup is to use the REST API.

After creating your free account go to settings to get your API key.

Within the Shipbot.io app, you will need to create an artifact to associate deployments too. Go to artifacts and click "Create Artifact".

Within your CI/CD system add a step that tracks a deployment:

curl -X POST https://api.shipbot.io/deployment \
-H "X-Api-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"version":"0.0.1","artifactId":1,"environment":"PRODUCTION","commitSha":"1234567890","user":"my-github-username","branch":"main"}'

This will track a successful deployment. Read about the artifact and deployment releationship.

A full list of available fields is here.

If you want to track when deployments start and then finish. You can track the start and end of a deployment with the following:

DEPLOYMENT_ID=$(curl -X POST https://api.shipbot.io/deployment \
-H "X-Api-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"version":"1234567890","status":"STARTED","artifactId":1,"environment":"PRODUCTION","commitSha":"1234567890","user":"my-github-username","branch":"main"}' \
| jq -r '.id')

Then to update the deployment with the end time:

curl -X PATCH https://api.shipbot.io/deployment/$DEPLOYMENT_ID \
-H "X-Api-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{"status":"SUCCEEDED"}'