Skip to content

@getstalkr micro service which feeds our clients with Travis builds events.

License

Notifications You must be signed in to change notification settings

getstalkr/travis-builds-feed

Repository files navigation

stalkr | Travis | Builds Feed



stalkr micro service which feeds our clients with Travis build events.



Table of Contents

Usage

A Few Technical Notes

WebHooks

Webhooks are user-defined HTTP callbacks which are usually triggered by some event, such as pushing code to a repository–which is what happens here–or a comment being posted to a blog. When that event occurs, the source platform makes an HTTP request to the URI which as been previously set for the webhook.

Users can set them to cause events on one site to invoke behaviour on another. The action taken may be anything. Common uses are to trigger builds with continuous integration systems or to notify bug tracking systems–and that's how stalkr works. Since they use HTTP, they can be integrated into web services without adding new infrastructure.

We intend to work over a bunch of different realtime frameworks–e.g. Socket.IO, Primus and ws–and services–e.g. Ably, PubNub and Pusher itself–based on a commom protocol for transporters.

But now Pusher has shown to achieve good documentation/examples, a solid API, and great backend/debug tools, which led us to deal, in our Minimum Viable Product, only with Pusher.

Then you need to create an account, and make a note of your app_id, app_key and app_secret for each project you'd like to integrate with stalkr.

Getting Started

Locally

  1. Make sure you define the ENV variables below:

    # Pusher credentials
    export PUSHER_ID='123456'
    export PUSHER_KEY='4JEUi0C2UT49m872Euc5'
    export PUSHER_SECRET='Bzx2MlrMbNtBpZv391J1'
    
    # Basic stalkr cell metadata
    export STALKR_TEAM='myTeam'
    export STALKR_PROJECT='myProject'
  2. Clone this repository:

    git clone https://github.com/getstalkr/travis-builds-feed
  3. Install all dependencies:

    # via npm
    npm install
    # or using yarn
    yarn
  4. Launch it:

    # via npm
    npm start
    # or using yarn
    yarn start

If everything goes okay, it should now be running at localhost:3000.

Deploying

  1. Install now globally:

    # via npm
    npm install -g now
    # or using yarn
    yarn global add now
  2. Run now with the -e flag to define these environment variables:

    now -e PUSHER_ID='123456' \
           PUSHER_KEY='4JEUi0C2UT49m872Euc5' \
           PUSHER_SECRET='Bzx2MlrMbNtBpZv391J1' \
           STALKR_TEAM='myTeam' \
           STALKR_PROJECT='myProject'

On Travis

  1. Go to your .travis.yml and define your stalkr webhook to be notified about build results:
notifications:
  webhooks: http://<your stalkr webhook endpoint>

On The TV

stalkr  TV tab 'New Dashboard'

  1. Install the Stalkr on your  TV

  2. Go to New Dashboard tab.

    We recommend the use of one iPhone or remote keyboard to set the config in inputs.

  3. You don't need to fill all the steps, but only the section Dashboard and, in the next sections, you'll need to fill only if you want this cell in your dashboard.

  4. In order to know how to set a "Pusher Key" parameter, see the Pusher section.


Maintainer:

ythecombinator.me  ·  GitHub @ythecombinator  ·  Twitter @ythecombinator

Releases

No releases published

Packages

No packages published