0.0.4 • Published 9 years ago

teamcity-notifier v0.0.4

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

teamcity-notifier

Node-project that can fire events when a build fails or is fixed in Teamcity

var TeamCity = require('teamcity-notifier');

var tc = new TeamCity({
  host: 'teamcity-server',
  port: 80,
  user: 'username',
  password: 'password'
});

tc.on('unauthorized', function() {
  console.log('Invalid teamcity credentials, stopping');
  test.stop();
});


tc.on('new-build', function(build) {
  console.log('New build started for ' + build.buildTypeId);
});

tc.on('finished-build', function(build) {
  console.log('Build finished for ' + build.buildTypeId);
});

tc.on('error', function(e) {
  console.log('An error occured: ' + e.message);
  test.stop();
});


tc.on('status-changed', function(oldBuild, newBuild) {
  if(oldBuild.status === 'SUCCESS' && newBuild.status === 'FAILURE') {
    console.log('Build for ' + build.buildTypeId + ' broke!');
  }
});

tc.on('state-changed', function(oldBuild, newBuild) {
  // Well, do something!
});

tc.start();
0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

10 years ago

0.0.1

10 years ago