icecave/woodhouse
最新稳定版本:1.0.0
Composer 安装命令:
composer require icecave/woodhouse
包简介
Command line tools for automated publication to GitHub Pages.
README 文档
README
Woodhouse is a command line utility (and PHP library) for publishing build artifacts such as test reports and code coverage metrics to a GitHub pages repository. It was originally designed to run in a Travis CI build, but can be used in any environment.
- Download executable PHAR
- Install via Composer package icecave/woodhouse
Features
Publishing artifacts
The most basic use of Woodhouse is to publish build artifacts.
$ woodhouse publish bob/widget report.html:artifacts/tests.html --auth-token 0be..8a3
The example above publishes a file called report.html in the current directory to artifacts/tests.html in the gh-pages branch of the bob/widget GitHub repository. Multiple artifacts can be published in a single commit by specifying additional source:destination pairs. The source path may reference individual files or directories.
Build status badges
Woodhouse is able to parse several common test report formats to deduce the result of a build and publish an appropriate status image. This image can be used in a GitHub README.md file or on a website to show the current status of the build.
$ woodhouse publish bob/widget --build-status-image img/status.png --build-status-junit junit.xml --auth-token 0be..8a3
This example parses junit.xml to determine the build status, and then publishes the appropropriate status image to img/status.png. The images at the top of this document are published in this way.
The supported test report formats are:
- JUnit XML
- TAP (Test Anything Protocol)
- PHPUnit JSON
You can also specify the build status directly on the command line using the --build-status-result option.
Coverage badges
Much like the build status images, Woodhouse can also publish images showing code coverage percentages.
$ woodhouse publish bob/widget --coverage-image img/coverage.png --coverage-phpunit coverage.txt --auth-token 0be..8a3
This example parses coverage.txt (A file created using PHPUnit's --coverage-text option) to determine
the coverage percentage, and then publishes the appropropriate image to img/coverage.png.
You can also specify the coverage percentage directly on the command line using the --coverage-percentage option.
Image themes
Woodhouse uses ezzatron/ci-status-images for the build status and
coverage images. There are several themes and variants available. The desired theme(s) can be chosen with the
--image-theme option. The default theme is travis/variable-width.
Security
Woodhouse requires a GitHub OAuth token with write access to publish content.
THIS TOKEN MUST BE KEPT SECURE, ANYONE WITH ACCESS TO THIS TOKEN CAN MANIPULATE YOUR GITHUB ACCOUNT
Under Travis CI, encrypted environment variables
can be used to store the token such that it can only be decrypted by Travis. To complement this feature, Woodhouse
provides the --auth-token-env option to read the token from an environment variable, preventing it from being logged
to the console.
Please note that although it is tempting to create a separate GitHub account solely for publishing of artifacts, this is explicitly prohibited by GitHub's Terms of Service.
Creating a GitHub token
A GitHub token can be created using the github:create-auth command. This only needs to be done once for your GitHub
account.
$ woodhouse github:create-auth
You will be prompted for your GitHub username and password. These credentials are used to create the authorization via the GitHub API and are not stored.
Revoking a GitHub token
If you suspect your token has been compromised, it can be revoked on the application settings
page, or using the github:delete-auth command.
$ woodhouse github:list-auth # To get a list of authorizations.
158534: 0be..8a3 Woodhouse (API) [repo] https://github.com/IcecaveStudios/woodhouse
$ woodhouse github:delete-auth 158534 # The authorization ID from above.
You will then need to create a new token as described above.
Contact us
- Follow @IcecaveStudios on Twitter
- Visit the Icecave Studios website
- Join
#icecaveon irc.freenode.net
icecave/woodhouse 适用场景与选型建议
icecave/woodhouse 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.26k 次下载、GitHub Stars 达 25, 最近一次更新时间为 2013 年 01 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「phpunit」 「code」 「github」 「Xdebug」 「publish」 「pages」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 icecave/woodhouse 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 icecave/woodhouse 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 icecave/woodhouse 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Memio's PrettyPrinter, used to generate PHP code from given Model
Handles basic OAuth/OAuth2 authentication along with classes for common services
HiDev plugin for PHPUnit
Testing Suite For Lumen like Laravel does.
A cli tool which generates unit tests.
MediaWiki extension that allows embedding external content, specified by URL, into your wiki pages
统计信息
- 总下载量: 3.26k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 26
- 点击次数: 19
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-01-19