Fixed headlines in docs

This commit is contained in:
Dmitry Khomutov 2017-01-04 19:22:20 +07:00
parent d4a9dd2493
commit 4692999337
51 changed files with 119 additions and 119 deletions

View file

@ -1,12 +1,12 @@
PHP Censor
----------
==========
PHP Censor is a fork of PHPCI (And B8Framework) and is a free and open source (BSD-2-Clause license) continuous
integration tool specifically designed for PHP. We've built it with simplicity in mind, so whilst it doesn't
do *everything* Jenkins can do, it is a breeze to set up and use.
What it does
============
------------
* Clones your project from Github, Bitbucket or a local path
* Allows you to set up and tear down test databases.
@ -16,13 +16,13 @@ What it does
* You can mark certain plugins as being allowed to fail (but still run.)
What it doesn't do (yet)
========================
------------------------
* Virtualised testing.
* Multiple PHP-version tests.
Screenshots
===========
-----------
[![Dashboard](docs/screenshots/dashboard.png)](docs/screenshots/dashboard.png)
@ -35,7 +35,7 @@ Screenshots
[![Build information](docs/screenshots/build-information.png)](docs/screenshots/build-information.png)
Tests
=====
-----
```bash
cd /path/to/php-censor
@ -47,7 +47,7 @@ For Phar plugin tests set 'phar.readonly' setting to Off (0) in `php.ini` config
For database B8Framework tests create empty 'b8_test' MySQL database on 'localhost' with user/password: `root/root`. Otherwise database tests will be skipped.
Migrations
==========
----------
Run to apply latest migrations:
@ -64,11 +64,11 @@ cd /path/to/php-censor
```
Documentation
=============
-------------
[PHP Censor documentation](docs/README.md)
License
=======
-------
PHP Censor is open source software licensed under the BSD-2-Clause license.

View file

@ -1,8 +1,8 @@
PHP Censor documentation
------------------------
========================
Getting Started
===============
---------------
* [Installing PHP Censor](installing.md)
* [Adding a Virtual Host](virtual_host.md)
@ -15,7 +15,7 @@ Getting Started
* [Configuring PHP Censor](configuring.md)
Using PHP Censor
================
----------------
* Automatically building commits pushed to
* [Github](sources/github.md)
@ -26,7 +26,7 @@ Using PHP Censor
* [Project Status Images and Status Page](status.md)
Plugins
=======
-------
* [Atoum](plugins/atoum.md) - `atoum`
* [Behat](plugins/behat.md) - `behat`

View file

@ -1,5 +1,5 @@
Adding PHP Censor Support to Your Projects
------------------------------------------
==========================================
Similar to Travis CI, to support PHP Censor in your project, you simply need to add a `.php-censor.yml` (`phpci.yml`/`.phpci.yml` for backward compatibility with PHPCI) file to the root of
your repository. The file should look something like this:

View file

@ -1,5 +1,5 @@
Configuring PHP Censor
----------------------
======================
The PHP Censor configuration on the server is automatically generated into the `config.yml` file during installation. One might need to also edit the file manually.

View file

@ -1,8 +1,8 @@
Installing PHP Censor
---------------------
=====================
What you'll need
================
----------------
* PHP 5.4.0 or above
* A web server (Nginx or Apache)
@ -13,7 +13,7 @@ What you'll need
* PHP must have OpenSSL support enabled.
Installing PHP Censor from Composer
===================================
-----------------------------------
* Go to the directory in which you want to install PHP Censor, for example: `/var/www`
* Download Composer if you haven't already: `curl -sS https://getcomposer.org/installer | php`
@ -24,7 +24,7 @@ Installing PHP Censor from Composer
* [Set up the PHP Censor Worker](workers/worker.md), or you can run builds using the [daemon](workers/daemon.md) or [a cron-job](workers/cron.md) to run PHP Censor builds.
Installing PHP Censor Manually
==============================
------------------------------
* Go to the directory in which you want to install PHP Censor, for example: `/var/www`
* [Download PHP Censor](https://github.com/corpsee/php-censor/releases/latest) and unzip it.

View file

@ -1,5 +1,5 @@
Injecting variables into messages
---------------------------------
=================================
Most strings used in the build configuration can have variables related to the build inserted into them with the following syntax:

View file

@ -1,13 +1,13 @@
Setting up Logging
------------------
==================
Basics
======
------
The PHP Censor codebase makes use of the [PSR3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) logging standard. By default we use [Monolog](https://github.com/Seldaek/monolog) to handle the actual work implementing this standard.
How to Setup Logging (For people running a PHP Censor instance)
===============================================================
---------------------------------------------------------------
The only step required to activate logging is to create a file in the root directory called loggerconfig.php with content like the following:
@ -27,7 +27,7 @@ This file should return an array of key value pairs. Each key tells PHP Censor w
Once this file is created all plugins and core PHP Censor functionality should start writing to the configured handlers.
How to write to the Log (For people creating a new plugin)
==========================================================
----------------------------------------------------------
### Using the plugin constructor to get a logger directly

View file

@ -1,10 +1,10 @@
Plugin Atoum
------------
============
Allows you to run [Atoum](https://github.com/atoum/atoum) unit tests.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin Behat
------------
============
A very simple plugin for running [Behat](http://behat.org/) BDD tests.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin Campfire
---------------
===============
This plugin joins a [Campfire](https://campfirenow.com/) room and sends a user-defined message, for example a "Build Succeeded" message.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin Clean build
------------------
==================
Works through a list of files to remove from your build. Useful when used in combination with Copy Build or Package Build.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin Codeception
------------------
==================
A simple plugin that allows you to run [Codeception](http://codeception.com/) tests.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin Composer
---------------
===============
Allows you to run Composer within your build, to install dependencies prior to testing. Best run as a "setup" stage plugin.
Configuration
=============
-------------
### Options
@ -26,7 +26,7 @@ setup:
```
Warning
=======
-------
If you are using a Composer private repository like Satis, with HTTP authentication, you must check your username and password inside the ```auth.json``` file. PHP Censor uses the ```--no-interaction``` flag, so it will not warn if you must provide that info.

View file

@ -1,10 +1,10 @@
Plugin Copy Build
-----------------
=================
Copies all files from your build, with the exception of those in the "ignore" build settings property, to a directory of your choosing.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin Deployer
---------------
===============
Triggers a deployment of the project to run via [Deployer](http://phpdeployment.org)
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin Email
------------
============
Sends a build status email.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin Env
----------
==========
Sets environment variables on the PHP Censor server for the build.
Configuration
=============
-------------
### Examples:

View file

@ -1,10 +1,10 @@
Plugin Grunt
------------
============
This plugin runs [Grunt](http://gruntjs.com/) tasks.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin Hipchat Notify
---------------------
=====================
This plugin joins a [HipChat](https://www.hipchat.com/) room and sends a user-defined message, for example a "Build Succeeded" message.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin IRC
----------
==========
Connects to an IRC server and sends a defined message.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin Lint
-----------
===========
This plugin runs PHP's built in Lint (syntax / error check) functionality.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin MySQL
------------
============
Connects to a given MySQL server and runs a selection of queries.
Configuration
=============
-------------
### Examples

View file

@ -1,10 +1,10 @@
Plugin Package Build
--------------------
====================
Builds a tar or zip archive of your build and places it in a directory of your choosing.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin Pdepend
--------------
==============
Runs [PDepend](http://pdepend.org/) software metrics.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin PostgreSQL
-----------------
=================
Connects to a given PostgreSQL server and runs a list of queries.
Configuration
=============
-------------
### Examples

View file

@ -1,10 +1,10 @@
Plugin Phar
-----------
===========
Allows you to create a [Phar](http://php.net/manual/en/book.phar.php) archive from your project.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin Phing
------------
============
This plugin allows you to use the Phing build system to build your project.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin PHP Code Sniffer
-----------------------
=======================
Runs PHP Code Sniffer against your build.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin PHP Copy/Paste Detector
------------------------------
==============================
Runs PHP Copy/Paste Detector against your build.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin PHP Coding Standards Fixer
---------------------------------
=================================
Runs PHP Coding Standards Fixer against your build.
Configuration
=============
-------------
### Options
@ -25,6 +25,6 @@ test:
```
Warning
=======
-------
There is currently a bug with this plugin that will cause an error if you leave the level to default to `all`. That level does not exist and will cause the build to fail. Instead specify the level explicitly until this is fixed.

View file

@ -1,10 +1,10 @@
Plugin PHP Docblock Checker
---------------------------
===========================
Runs the PHP Docblock Checker against your build. This tool verifies that all classes and methods have docblocks.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin PHPLoc
-------------
=============
Runs [PHPLoc](https://github.com/sebastianbergmann/phploc) against your project and records some key metrics.
Configuration
=============
-------------
### Options
@ -12,7 +12,7 @@ Configuration
### Example
Run PHPLOC against the app directory only. This will prevent inclusion of code from 3rd party libraries that are included outside of the app directory.
Run PHPLoc against the app directory only. This will prevent inclusion of code from 3rd party libraries that are included outside of the app directory.
```yml
test:

View file

@ -1,10 +1,10 @@
Plugin PHP Mess Detector
------------------------
========================
Runs PHP Mess Detector against your build. Records some key metrics, and also reports errors and warnings.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin PHP Parallel Lint
------------------------
========================
Similar to the [standard PHP Lint plugin](lint.md), except that it uses the [PHP Parallel Lint](https://github.com/JakubOnderka/PHP-Parallel-Lint) project to run.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin PHP Spec
---------------
===============
Runs [PHP Spec](http://www.phpspec.net/) tests against your build.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin PHPUnit
--------------
==============
Runs PHPUnit tests against your build.
Configuration
=============
-------------
### Options
@ -37,7 +37,7 @@ test:
```
Troubleshooting
===============
---------------
If standard logging of PHP Censor is not enough, to get standard output from any command, including PHPUnit, edit `BaseCommandExecutor::executeCommand()` to see what exactly is wrong
* Run `composer update` in phpunit plugin directory of PHP Censor to get all of its dependencies

View file

@ -1,10 +1,10 @@
Plugin Shell
------------
============
Runs a given Shell command.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin Slack Notify
-------------------
===================
This plugin joins a [Slack](https://www.slack.com/) room and sends a user-defined message, for example a "Build Succeeded" message.
Configuration
=============
-------------
### Options

View file

@ -1,10 +1,10 @@
Plugin SQLite
-------------
=============
Connects to a given SQLite DB and runs a list of queries.
Configuration
=============
-------------
### Examples

View file

@ -1,10 +1,10 @@
Plugin Technical Dept
---------------------
=====================
Checks all files in your project for TODOs and other technical debt.
Configuration
=============
-------------
### Options

View file

@ -1,19 +1,19 @@
Plugin XMPP
-----------
===========
Requirements
============
------------
- sendxmpp package
Installation
============
------------
1. On debian system (for example) use aptitude command to install sendxmpp
2. Add XMPP plugin in "complete" section of your `php-censor.yml`
Configuration
=============
-------------
### Options

View file

@ -1,5 +1,5 @@
Automatically building commits pushed to Bitbucket
--------------------------------------------------
==================================================
If you would like your builds to run automatically whenever there is a commit or other similar activity in your Bitbucket repository, perform the following steps:

View file

@ -1,14 +1,14 @@
Automatically building commits pushed to Git
--------------------------------------------
============================================
Requirements
============
------------
- A git repository on a server (bare or plain does not matter)
- [curl](http://curl.haxx.se) to send the web hook
Installation
============
------------
1. Create a new file `post-receive` inside the [git `hooks` directory](http://www.git-scm.com/book/en/Customizing-Git-Git-Hooks) with the following content:

View file

@ -1,5 +1,5 @@
Automatically building commits pushed to GitHub
-----------------------------------------------
===============================================
If you would like your builds to run automatically whenever there is a commit or other similar activity in your GitHub repository, perform the following steps:

View file

@ -1,5 +1,5 @@
Automatically building commits pushed to GitLab
-----------------------------------------------
===============================================
If you would like your builds to run automatically whenever there is a commit or other similar activity in your GitLab repository, perform the following steps:

View file

@ -1,8 +1,8 @@
Project Status Images and Status Page
-------------------------------------
=====================================
Status Image
============
------------
Most Continuous Integration systems provide a simple image URL that you can use to display your project status on other web sites (like Github) - PHP Censor is no different.
@ -25,7 +25,7 @@ Example:
![](http://php-censor.local/build-status/image/2?style=flat-squared&maxAge=3600)
Status Page
===========
-----------
PHP Censor also provides a public project status page, that is accessible for everyone.

View file

@ -1,5 +1,5 @@
Updating PHP Censor
-------------------
===================
Updating PHP Censor to the latest release, or even dev-master updates is something that will need to be done from time to time. Most of this may be self-explanatory, but for clarity and completeness, it should be added to the documentation.

View file

@ -1,12 +1,12 @@
Adding a Virtual Host
---------------------
=====================
In order to access the PHP Censor web interface, you need to set up a virtual host in your web server.
Below are a few examples of how to do this for various different web servers.
Nginx Example
=============
-------------
```
server {
@ -29,7 +29,7 @@ server {
```
Apache Example
==============
--------------
For Apache, you can use a standard virtual host, as long as your server supports PHP. All you need to do is add the following to a `.htaccess` file in your PHP Censor `/public` directory.
@ -66,7 +66,7 @@ For Apache, you can use a standard virtual host, as long as your server supports
```
Built-in PHP Server Example
===========================
---------------------------
You can use the built-in PHP server `php -S localhost:8080` by adding `public/routing.php`.

View file

@ -1,12 +1,12 @@
Run Builds Using Cron
---------------------
=====================
Running builds using cron is a quick and simple method of getting up and running with PHP Censor. It also removes the need for PHP Censor to be running all the time.
If you want a little more control over how PHP Censor runs, you may want to [set up the PHP Censor daemon](workers/daemon.md) instead.
Setting up the Cron Job
=======================
-----------------------
You'll want to set up PHP Censor to run as a regular cronjob, so run `crontab -e` and enter the following:

View file

@ -1,5 +1,5 @@
Run Builds Using a Daemon
-------------------------
=========================
The PHP Censor daemon runs in the background on your server and continuously checks for new builds. Unless already running a build, the daemon should pick up and start running new builds within seconds of being created.
@ -8,7 +8,7 @@ The daemon is also useful if you want to run multiple PHP Censor workers in a vi
If you want to run PHP Censor builds on a regular schedule instead, you should [set up a cron-job](workers/cron.md).
Starting the Daemon
===================
-------------------
On a Linux/Unix server, the following command will start the daemon and keep it running even when you log out of the server:

View file

@ -1,5 +1,5 @@
Run Builds Using a Worker
-------------------------
=========================
The PHP Censor Worker runs in the background on your server and waits for new builds to be added to a Beanstalkd queue. Unless already running a build, the worker will pick up and start running new builds almost immediately after their creation.
@ -8,13 +8,13 @@ The worker is the recommended way to run PHP Censor builds. You can run several
If you can't run Beanstalkd on your server, or would prefer to run builds on a regular schedule, you should consider using the [build daemon](workers/daemon.md) or [running builds via Cron](workers/cron.md).
Pre-Requisites
==============
--------------
* You need to install [Beanstalkd](http://kr.github.io/beanstalkd/) - On Ubuntu, this is as simple as running `apt-get install beanstalkd`.
* [Supervisord](http://supervisord.org/) needs to be installed and running on your server.
Setting up the PHP Censor worker
================================
--------------------------------
### On a new installation
@ -29,7 +29,7 @@ On an existing installation, to set up the worker, you simply need to add the be
![PHP Censor Worker Config](https://www.phptesting.org/media/render/9a88e9298670f2913f5798e68b94c9ed)
Running the PHP Censor worker
=============================
-----------------------------
Once you've set up PHP Censor to add your jobs to a beanstalkd queue, you need to start the worker so that it can pick up and run your builds. On most servers, it is best to manage this using supervisord. The following instructions work on Ubuntu, but will need slight amendments for other distributions.