2017 © Pedro Peláez
 

library teamcity-messages

Write TeamCity service messages from PHP.

image

michal-kocarek/teamcity-messages

Write TeamCity service messages from PHP.

  • Tuesday, April 26, 2016
  • by michal-kocarek
  • Repository
  • 0 Watchers
  • 2 Stars
  • 7,096 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 9 % Grown

The README.md

TeamCity Messages

This PHP library simplifies formatting and writing TeamCity service messages., (*1)

Build Status Coverage Status, (*2)

Installation

To add TeamcityMessages as a local, per-project dependency to your project, simply add a dependency on michal-kocarek/teamcity-messages to your project's composer.json file. Here is a minimal example of a composer.json file that just defines a dependency on TeamcityMessages:, (*3)

{
    "require": {
        "michal-kocarek/teamcity-messages": "^1.2"
    }
}

Usage

Here's the basic example. MessageLogger instance dumps everything through the writer., (*4)

StdOutWriter echoes output directly to script standard output. (You may use CallbackWriter to pass messages to arbitrary callback.), (*5)

Code like this:, (*6)

use MichalKocarek\TeamcityMessages\MessageLogger;
use MichalKocarek\TeamcityMessages\Writers\StdoutWriter;

$logger = new MessageLogger(new StdoutWriter());

$logger->progressMessage('Reticulating splines...');

$logger->block('Counting llamas...', null, function(MessageLogger $logger) {
    $logger->logWarning('Too many llamas!');
    $logger->publishArtifacts('logs/llamas-count.csv');
});

produces following output:, (*7)

##teamcity[progressMessage timestamp='2016-03-16T23:29:37.120555+0000' message='Reticulating splines...']
##teamcity[blockOpened timestamp='2016-03-16T23:29:37.134303+0000' name='Counting llamas...']
##teamcity[message timestamp='2016-03-16T23:29:37.134535+0000' text='Too many llamas!' status='WARNING']
##teamcity[publishArtifacts timestamp='2016-03-16T23:29:37.134635+0000' path='logs/llamas-count.csv']
##teamcity[blockClosed timestamp='2016-03-16T23:29:37.134993+0000' name='Counting llamas...']

See MessageLogger public methods for more info about the usage and link below for detailed message specification., (*8)

Authors

Michal Kočárek michal.kocarek@brainbox.cz - https://twitter.com/michalkocarek, (*9)

License

This library is licensed under the MIT License – see the LICENSE file for details., (*10)

The Versions

26/04 2016

dev-master

9999999-dev

Write TeamCity service messages from PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Michal Kočárek

teamcity

26/04 2016

1.2.1

1.2.1.0

Write TeamCity service messages from PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Michal Kočárek

teamcity

28/03 2016

1.2.0

1.2.0.0

Write TeamCity service messages from PHP.

  Sources   Download

MIT

The Requires

  • php >=5.4

 

The Development Requires

by Michal Kočárek

teamcity

22/03 2016

1.1.0

1.1.0.0

Write TeamCity service messages from PHP.

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

by Michal Kočárek

teamcity

17/03 2016

1.0.0

1.0.0.0

Write TeamCity service messages from PHP.

  Sources   Download

MIT

The Requires

  • php >=5.6

 

The Development Requires

by Michal Kočárek

teamcity