Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Working with Deployments

Emma Sax edited this page Jun 19, 2017 · 5 revisions

The code that is currently set up for deployments is not meant to take deployment webhooks from GitHub. Instead, there is merely code that is set up for an API call, from whatever method you're using to deploy your code. The API call that Sport Ngin are using looks something like:

curl -i -X POST -d 'repo_name=sportngin/<name>' -d 'pull_request_ids=<pull request ids as comma separated string>' -d 'git_revision=<git revision sha>' '<url>'

But the most important part is just that the API call has the same parameters as are highlighted either above or in app/controllers/hubstats/deploys_controller.rb. As long as the pull requests in the deployment are marked as merged and closed, and the user who deploys the deployment is present in the database, the code will take care of everything else.

Using the deployments page on Hubstats can be really useful to seeing how often your code is going out to production, as well as monitoring who is doing deployments and how many. Many of the other pages show deployment counts as a way of finding metrics.

Update from SportsEngine on June 19, 2017

Hubstats' newest version (0.11.0) no longer supports deployments. For regressive purposes, initial code was left in place, but the UI will no longer show deployment data. Please refer to https://github.com/sportngin/hubstats/pull/121 for additional information.