Git Product home page Git Product logo

teamcity-yammer-notifier's Introduction

teamcity-yammer

A configurable TeamCity plugin that enables notifications to be sent to Yammer group and users. Because it is a TeamCity Custom Notifier plugin, it extends the existing user interface and allows for easy configuration directly within your TeamCity server. Once installed, you can configure the plugin for multiple TeamCity projects and multiple build conditions (i.e. Build failures, successes, hangs, etc.)

This is an example of a successful build notification sent to a group:

Successful Build Notification

This is an example of a successful build notification sent as a private message:

Successful Build Notification

Installation

Download the plugin zip package.

Follow the TeamCity plugin installation directions.

You will need to restart the TeamCity service before you can configure the plugin.

Configuration

Once you have installed the plugin and restarted head on over to the Admin page and configure your Yammer settings.

Admin Page Configuration

  • The user token can be obtained via the button Generate a yammer access token and fill the form with Application Key(Client ID), Application Secret Key(Client Secret), Yammer username, Yammer password.

Generate yammer access token

  • Yammer Group is the group where notifications will be sent.

Create yammer application

Sign up for Yammer https://www.yammer.com

Go to https://www.yammer.com/client_applications and register a new app.

Configuration Settings

Fill out the form with your data “Redirect URI” with: https://www.yammer.com

Navigate to the the Application Information page, note your Client ID and Client Secret.

Configuration Settings

Choose Yammer Group

Once the token is successfully saved you can choose from the group where you want to post teamcity notifications

Yammer UserName and notification rules

In order to receive direct messages from the notifier you must go to your profile page in TeamCity and tell it your yammer username.

Enter the Yammer username in the Notification settings as seen below.

Add notification rules as appropriate.

Configuration Settings

Once you have done this you can receive private messages on failed/successful builds.

Warning

Tested exclusively with TeamCity version 9.0.3.

Developers

Issam GUISSOUMA

License

Code released under the MIT license.

teamcity-yammer-notifier's People

Contributors

iguissouma avatar

Stargazers

Adrian Edwards avatar Pascal Berger avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

techtrekker

teamcity-yammer-notifier's Issues

Number of groups is limited

When you select the group to post to, you can only select the top 20? groups? I have far, far more groups than this.
Suggest that you use the group ID for this.

Private message not working

I have provided my yammer permalink in the teamcity settings, but I don't seem to be getting private messages on build status. Am I doing something wrong? It's the permalink right?

Yammer notifier plugin can prevent new builds from starting

Seems the plugin performs some HTTP calls in beforeBuildFinish event:

java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)
at sun.security.ssl.InputRecord.readFully(Unknown Source)
at sun.security.ssl.InputRecord.read(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readDataRecord(Unknown Source)
at sun.security.ssl.AppInputStream.read(Unknown Source)
at org.apache.http.impl.io.SessionInputBufferImpl.streamRead(SessionInputBufferImpl.java:136)
at org.apache.http.impl.io.SessionInputBufferImpl.fillBuffer(SessionInputBufferImpl.java:152)
at org.apache.http.impl.io.SessionInputBufferImpl.readLine(SessionInputBufferImpl.java:270)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:140)
at org.apache.http.impl.conn.DefaultHttpResponseParser.parseHead(DefaultHttpResponseParser.java:57)
at org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:260)
at org.apache.http.impl.DefaultBHttpClientConnection.receiveResponseHeader(DefaultBHttpClientConnection.java:161)
at sun.reflect.GeneratedMethodAccessor239.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.http.impl.conn.CPoolProxy.invoke(CPoolProxy.java:138)
at com.sun.proxy.$Proxy307.receiveResponseHeader(Unknown Source)
at org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestExecutor.java:271)
at org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.java:123)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:254)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
at org.igu.yammer.YammerClient.sendMessage(YammerClient.java:102)
at org.igu.teamcity.YammerNotificationListener.processBuildEvent(YammerNotificationListener.java:56)
at org.igu.teamcity.YammerNotificationListener.beforeBuildFinish(YammerNotificationListener.java:83)
at sun.reflect.GeneratedMethodAccessor194.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at jetbrains.buildServer.util.EventDispatcher$3.run(EventDispatcher.java:126)
at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:71)
at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:120)
at jetbrains.buildServer.serverSide.ServerSideEventDispatcher.superDispatch(ServerSideEventDispatcher.java:13)
at jetbrains.buildServer.serverSide.ServerSideEventDispatcher$1.run(ServerSideEventDispatcher.java:2)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAs(SecurityContextImpl.java:48)
at jetbrains.buildServer.serverSide.impl.auth.SecurityContextImpl.runAsSystem(SecurityContextImpl.java:49)
at jetbrains.buildServer.serverSide.ServerSideEventDispatcher.dispatch(ServerSideEventDispatcher.java:12)
at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:70)
at com.sun.proxy.$Proxy21.beforeBuildFinish(Unknown Source)
at jetbrains.buildServer.serverSide.impl.RunningBuildImpl.finalSteps(RunningBuildImpl.java:19)
at jetbrains.buildServer.serverSide.impl.RunningBuildImpl.finish(RunningBuildImpl.java:417)
at jetbrains.buildServer.serverSide.impl.RunningBuildsManagerImpl.finishBuild(RunningBuildsManagerImpl.java:182)
at jetbrains.buildServer.serverSide.impl.RunningBuildsManagerImpl.lambda$scheduleBuildFinishing$0(RunningBuildsManagerImpl.java:6)
at jetbrains.buildServer.serverSide.impl.RunningBuildsManagerImpl$$Lambda$844/1811420678.call(Unknown Source)

But it looks like these HTTP requests do not have proper timeout and thus in case of network connectivity problems they can stall which results in inability to start new builds, since TeamCity can't finish a previous one.

Show info on message

It would be great to show more info than just start/fail. Like

  • how many tests failed
  • what tests failed
  • Link to the build

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.