michal-kocarek/teamcity-messages 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

michal-kocarek/teamcity-messages

Composer 安装命令:

composer require michal-kocarek/teamcity-messages

包简介

Write TeamCity service messages from PHP.

关键字:

README 文档

README

This PHP library simplifies formatting and writing TeamCity service messages.

Build Status Coverage Status

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:

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

Usage

Here's the basic example. MessageLogger instance dumps everything through the writer.

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

Code like this:

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:

##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.

Links

Authors

Michal Kočárek michal.kocarek@brainbox.cz - https://twitter.com/michalkocarek

License

This library is licensed under the MIT License – see the LICENSE file for details.

统计信息

  • 总下载量: 16.19k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 0
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-03-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固