Giter Site home page Giter Site logo

flowdock-build-notifier's Introduction

FlowdockNotify

This is used by the build agent to notify the person who (most likely) started the build that their build is complete, whether or not it failed or passed.

The teamcity api is used to fetch information about the build because we cannot find it out in the environment.

Installation

  1. Add this gem to your Gemfile

  2. Set up a TeamCity account with access to all the projects being reported on and a Flowdock account with access to your team's flow - it will be the account sending messages to your team members. Put these bots' credentials into the configuration below.

  3. Make a .flowdock_build_notifier.yml file in the root of your project. An example is given below:

    flowdock_user_token: SECRET_FLOWDOCK_USER_TOKEN
    flow_name: FLOW_NAME
    
    teamcity_url: https://teamcity.your_account.com
    teamcity_user: SECRET_TEAMCITY_USER_NAME
    teamcity_password: SECRET_TEAMCITY_USER_PASSWORD
    
    email_map:
      [email protected]: [email protected]
      [email protected]: [email protected]

    For privacy, you should put this file in your .gitignore. Alternatively, TeamCity login information and flowdock user token can be left out of the yaml configuration file by assigning the following ENV variables on TeamCity if you prefer.

    ENV['FLOWDOCK_USER_TOKEN']
    ENV['FLOWDOCK_NOTIFIER_TEAMCITY_USER']
    ENV['FLOWDOCK_NOTIFIER_TEAMCITY_PASSWORD']
    

    The email map is used to connect the author of the last commit to the corresponding Flowdock account.

  4. Under project settings on TeamCity, upload the following xml document as a meta-runner:

    <?xml version="1.0" encoding="UTF-8"?>
    <meta-runner name="Flowdock Notify">
      <description>Notify build status via flowdock</description>
      <settings>
        <parameters />
        <build-runners>
          <runner name="" type="simpleRunner">
            <parameters>
              <param name="command.executable" value="bundle exec flowdock_notify" />
              <param name="command.parameters" value="%teamcity.build.id%" />
              <param name="teamcity.step.mode" value="default" />
            </parameters>
          </runner>
        </build-runners>
        <requirements />
      </settings>
    </meta-runner>

    Meta-runner section

  5. Set up your build configuration steps to run bundle install initially. Make a final step which executes the notifier meta-runner regardless of previous failures.

    Meta-runner configuration step


    Use meta-runner in all cases

  6. If you want a particular build to report failure in the main flow instead of private messages, set ENV['FLOWDOCK_NOTIFY_ALL_ON_FAILURE'] to true.

flowdock-build-notifier's People

Contributors

aaronjensen avatar derekmaffett avatar smdern avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

derekmaffett

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.