forked from customink/stoplight
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathparams.json
More file actions
1 lines (1 loc) · 5.57 KB
/
Copy pathparams.json
File metadata and controls
1 lines (1 loc) · 5.57 KB
1
{"name":"Stoplight","body":"Stoplight\r\n=========\r\n[](http://travis-ci.org/customink/greenscreen)\r\n\r\nIntroduction\r\n------------\r\nStoplight is a build monitoring tool that is largely based off [greenscreen](https://github.com/martinjandrews/greenscreen), but is much improved and expandable. To quickly name a few, Stoplight has:\r\n\r\n - built-in support for [Jenkins](http://www.jenkis-ci.org)\r\n - built-in support for Travis-CI(http://travis-ci.org)\r\n - custom provider support\r\n - community contributions\r\n - full test suite\r\n - resuable DSL\r\n\r\nStoplight is designed to be displayed on large television screens or monitors. It automatically resizes to fill the maximum real estate the screen can offer.\r\n\r\nInstallation\r\n------------\r\nStoplight is a Rack application, so you'll need to install Ruby and Rubygems before you can run Stoplight. **Stoplight requires Ruby 1.9.x**.\r\n\r\nStart by cloning the application repository:\r\n\r\n git clone git@github.com:customink/stoplight.git\r\n\r\nAnd then bundle all the application's dependencies:\r\n\r\n bundle install\r\n\r\nNext, copy the `config/servers.yml.example` file to `config/servers.yml`:\r\n\r\n cp config/servers.yml.example config/servers.yml\r\n\r\nIf you want to get up and running quickly and just see what Stoplight looks like, add the following to your configuration file. It will pull from Travis CI:\r\n\r\n```yaml\r\n-\r\n type: 'travis'\r\n url: http://travis-ci.org/repositories.json\r\n```\r\n\r\nStart the server with the `rackup` command:\r\n\r\n rackup ./config.ru\r\n\r\nNavigate to `http://localhost:9292` and check it out! You should see the status of a bunch of builds. The screen will refresh every 15 seconds to keep itself up to date.\r\n\r\n\r\nConfiguration\r\n-------------\r\nAll configuration options are specified through the `config/servers.yml` file we copied over before. There's significant documentation in that file on how to configure your servers.\r\n\r\nAll servers must specify a `type` option. This tells Stoplight what provider it should use. For example, if you are using Travis CI, your provider is `Travis` and the server type is `travis`. If you were using a custom server, the configuration might look like:\r\n\r\n```yaml\r\n-\r\n type: 'my_server'\r\n url: '...'\r\n```\r\n\r\nThis would look for a provider named `MyServer` under `lib/stoplight/providers`. For more information on writing a custom provider, see the **Contributing** section.\r\n\r\nIf you have a lot of projects, you may want to selective display them on Stoplight. Luckily, this is just a simple configuration option. To ignore certain projects, just add the `ignored_projects` field to the config. It even supports regular expressions:\r\n\r\n```yml\r\n-\r\n type: 'travis'\r\n url: 'http://travis-ci.org/repositories.json'\r\n ignored_projects:\r\n - /^rails-(.*)$/\r\n - some_other_project\r\n```\r\n\r\nConversely, you can choose to only show certain projects with the `projects` option:\r\n\r\n```yml\r\n-\r\n type: 'jenkins'\r\n url: 'http://jenkins.mycompany.com/cc.xml'\r\n projects:\r\n - /^public-(.*)$/\r\n - some_other_project\r\n```\r\n\r\nContributing\r\n------------\r\nOne of the larger goals of Stoplight was to server the open source community. As more Continuous Integration servers emerge, we needed a common DSL for interacting with them. This all arose when we wanted to add Travis CI support to Greenscreen. Greenscreen was written for CI's that conform to a standard that doesn't even exist anymore. Stoplight doesn't care how the data comes in from the provider!\r\n\r\nA `Provider` is really just a ruby class that defines two methods:\r\n\r\n```ruby\r\nclass MyProvider < Provider\r\n def provider\r\n 'my provider'\r\n end\r\n\r\n def projects\r\n # logic here\r\n end\r\nend\r\n```\r\n\r\nThe `provider` method is just a utility method that returns the name of the provider. The `projects` method is the \"magical\" method. This is where a developer parses the data into the given specification. You should take a look in `lib/stoplight/providers/sample.rb` for a good starting point.\r\n\r\nThe development environment is configured with all kinds of goodies like Spork, Guard, and Foreman. If you're developing, just run `foreman start` and code! As you write tests and code, Guard will run the tests, Spork will make it fast, and Growl will tell you if they passed or failed!\r\n\r\n\r\nDeployment\r\n----------\r\n\r\nDeploying Green Screen to [Heroku](http://www.heroku.com) is a snap.\r\n\r\nOf course, if your build servers aren't publicly accessible, Heroku won't be a great option. A [Chef Cookbook for deploying Green Screen](http://community.opscode.com/cookbooks/greenscreen) is available on [the Opscode Community site](http://community.opscode.com/cookbooks/greenscreen). You can read more about both options in [Nathen Harvey's blog](http://nathenharvey.com/blog/2012/01/02/deploying-green-screen/). Note that Greenscreen and Stoplight can be deployed in the same manner.\r\n\r\nCredits\r\n-------\r\n - GreenScreen was original developed by [martinjandrews](https://github.com/martinjandrews/greenscreen/).\r\n - The former version of GreenScreen was a fork of the updates made by [rsutphin](https://github.com/rsutphin/greenscreen/).\r\n - This version of Stoplight was written by [sethvargo](https://github.com/sethvargo)\r\n","tagline":"Hook it up to your builds and see their status from anywhere in the room","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}