Fixed naming (PHPCI -> PHP Censor)
This commit is contained in:
parent
a35160f627
commit
60d74b0b44
64 changed files with 534 additions and 583 deletions
|
|
@ -1,21 +1,21 @@
|
|||
PHPCI documentation
|
||||
-------------------
|
||||
PHP Censor documentation
|
||||
------------------------
|
||||
|
||||
Getting Started
|
||||
===============
|
||||
|
||||
* [Installing PHPCI](installing.md)
|
||||
* [Installing PHP Censor](installing.md)
|
||||
* [Adding a Virtual Host](virtual_host.md)
|
||||
* [Run Builds Using a Worker](workers/worker.md)
|
||||
* [Run Builds Using a Daemon](workers/daemon.md)
|
||||
* [Run Builds Using Cron](workers/cron.md)
|
||||
* [Adding PHPCI Support to Your Projects](config.md)
|
||||
* [Adding PHP Censor Support to Your Projects](config.md)
|
||||
* [Setting up Logging](logging.md)
|
||||
* [Updating PHPCI](updating.md)
|
||||
* [Configuring PHPCI](configuring.md)
|
||||
* [Updating PHP Censor](updating.md)
|
||||
* [Configuring PHP Censor](configuring.md)
|
||||
|
||||
Using PHPCI
|
||||
===========
|
||||
Using PHP Censor
|
||||
================
|
||||
|
||||
* Automatically building commits pushed to
|
||||
* [Github](sources/github.md)
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
Adding PHPCI Support to Your Projects
|
||||
-------------------------------------
|
||||
Adding PHP Censor Support to Your Projects
|
||||
------------------------------------------
|
||||
|
||||
Similar to Travis CI, to support PHPCI in your project, you simply need to add a `phpci.yml` file to the root of your repository. The file should look something like this:
|
||||
Similar to Travis CI, to support PHP Censor in your project, you simply need to add a `phpci.yml` file to the root of
|
||||
your repository. The file should look something like this:
|
||||
|
||||
```yml
|
||||
build_settings:
|
||||
|
|
@ -48,7 +49,7 @@ complete:
|
|||
- "DROP DATABASE IF EXISTS test;"
|
||||
```
|
||||
|
||||
As mentioned earlier, PHPCI is powered by plugins, there are several phases in which plugins can be run:
|
||||
As mentioned earlier, PHP Censor is powered by plugins, there are several phases in which plugins can be run:
|
||||
|
||||
* `setup` - This phase is designed to initialise the build procedure.
|
||||
* `test` - The tests that should be run during the build. Plugins run during this phase will contribute to the success or failure of the build.
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
Configuring PHPCI
|
||||
-----------------
|
||||
Configuring PHP Censor
|
||||
----------------------
|
||||
|
||||
The PHPCI configuration on the server is automatically generated into the `phpci/PHPCI/config.yml` file during installation. One might need to also edit the file manually.
|
||||
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.
|
||||
|
||||
For example, to [disable authentication](https://www.phptesting.org/news/phpci-1-5-released), one could log into phpci and go into the settings to disable it. But if you have already set up a username/password pair and have forgotten the password, and if the server is on a local network, and it's not sending the `forgot password` email, then editing the config file manually would be handy. To do so, just edit the `phpci` section in the config file (which is in [yaml format](https://en.wikipedia.org/wiki/YAML)), and add
|
||||
For example, one could log into phpci and go into the settings to disable it. But if you have already set up a username/password pair and have forgotten the password, and if the server is on a local network, and it's not sending the `forgot password` email, then editing the config file manually would be handy. To do so, just edit the `phpci` section in the config file (which is in [yaml format](https://en.wikipedia.org/wiki/YAML)), and add
|
||||
|
||||
phpci:
|
||||
authentication_settings:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
Installing PHPCI
|
||||
----------------
|
||||
Installing PHP Censor
|
||||
---------------------
|
||||
|
||||
What you'll need
|
||||
================
|
||||
|
|
@ -12,24 +12,24 @@ What you'll need
|
|||
* The following functions need to be enabled: `exec()`, `shell_exec()` and `proc_open()` in php.ini.
|
||||
* PHP must have OpenSSL support enabled.
|
||||
|
||||
Installing PHPCI from Composer
|
||||
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`
|
||||
* Download PHP Censor: `./composer.phar create-project corpsee/php-censor php-censor --keep-vcs --no-dev`
|
||||
* Go to the newly created PHP Censor directory, and install Composer dependencies: `cd php-censor && ../composer.phar install`
|
||||
* Run the PHP Censor installer: `./console phpci:install`
|
||||
* [Add a virtual host to your web server](virtual_host.md), pointing to the `public` directory within your new PHP Censor directory. You'll need to set up rewrite rules to point all non-existent requests to PHP Censor.
|
||||
* [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 PHPCI, for example: `/var/www`
|
||||
* Download Composer if you haven't already: `curl -sS https://getcomposer.org/installer | php`
|
||||
* Download PHPCI: `./composer.phar create-project block8/phpci phpci --keep-vcs --no-dev`
|
||||
* Go to the newly created PHPCI directory, and install Composer dependencies: `cd phpci && ../composer.phar install`
|
||||
* Run the PHPCI installer: `./console phpci:install`
|
||||
* [Add a virtual host to your web server](virtual_host.md), pointing to the `public` directory within your new PHPCI directory. You'll need to set up rewrite rules to point all non-existent requests to PHPCI.
|
||||
* [Set up the PHPCI Worker](workers/worker.md), or you can run builds using the [PHPCI daemon](workers/daemon.md) or [a cron-job](workers/cron.md) to run PHPCI builds.
|
||||
|
||||
Installing PHPCI Manually
|
||||
=========================
|
||||
|
||||
* Go to the directory in which you want to install PHPCI, for example: `/var/www`
|
||||
* [Download PHPCI](https://github.com/Block8/PHPCI/releases/latest) and unzip it.
|
||||
* Go to the PHPCI directory: `cd /var/www/phpci`
|
||||
* 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.
|
||||
* Go to the PHP Censor directory: `cd /var/www/php-censor`
|
||||
* Install dependencies using Composer: `composer install`
|
||||
* Install PHPCI itself: `php ./console phpci:install`
|
||||
* [Add a virtual host to your web server](virtual_host.md), pointing to the `public` directory within your new PHPCI directory. You'll need to set up rewrite rules to point all non-existent requests to PHPCI.
|
||||
* [Set up the PHPCI Worker](workers/worker.md), or you can run builds using the [PHPCI daemon](workers/daemon.md) or [a cron-job](workers/cron.md) to run PHPCI builds.
|
||||
* Install PHP Censor itself: `php ./console phpci:install`
|
||||
* [Add a virtual host to your web server](virtual_host.md), pointing to the `public` directory within your new PHP Censor directory. You'll need to set up rewrite rules to point all non-existent requests to PHP Censor.
|
||||
* [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.
|
||||
|
|
|
|||
|
|
@ -18,4 +18,4 @@ Where something can be one of the following:
|
|||
* **BUILD** - The build number
|
||||
* **PROJECT_TITLE** - The name of the project
|
||||
* **BUILD_PATH** - The path to the build
|
||||
* **BUILD_URI** - The URL to the build in PHPCI
|
||||
* **BUILD_URI** - The URL to the build in PHP Censor
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ Basics
|
|||
|
||||
The phpci 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 PHPCI instance)
|
||||
==========================================================
|
||||
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:
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Configuration
|
|||
- **args** [string, optional] - Allows you to pass command line arguments to Atoum.
|
||||
- **config** [string, optional] - Path to an Atoum configuration file.
|
||||
- **directory** [string, optional] - Path in which to run Atom (defaults to the build root).
|
||||
- **executable** [string, optional] - Allows you to provide a path to the Atom binary (defaults to PHPCI root, vendor/bin, or a system-provided Atom binary).
|
||||
- **executable** [string, optional] - Allows you to provide a path to the Atom binary (defaults to PHP Censor root, vendor/bin, or a system-provided Atom binary).
|
||||
|
||||
### Examples
|
||||
```yml
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ Configuration
|
|||
|
||||
### Options
|
||||
|
||||
- **executable** [string, optional] - Allows you to provide a path to the Behat binary (defaults to PHPCI root, vendor/bin, or a system-provided Behat binary).
|
||||
- **executable** [string, optional] - Allows you to provide a path to the Behat binary (defaults to PHP Censor root, vendor/bin, or a system-provided Behat binary).
|
||||
- **features** [string, optional] - Provide a list of Behat features to run.
|
||||
|
||||
### Examples
|
||||
|
|
|
|||
|
|
@ -28,7 +28,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. PHPCI uses the ```--no-interaction``` flag, so it will not warn if you must provide that info.
|
||||
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.
|
||||
|
||||
For more info, please check the Composer documentation.
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Configuration
|
|||
### Options
|
||||
|
||||
* **webhook_url** [required, string] - The URL to your Deployer WebHook
|
||||
* **reason** [optional, string] - Your deployment message. Default - PHPCI Build #%BUILD% - %COMMIT_MESSAGE%
|
||||
* **reason** [optional, string] - Your deployment message. Default - PHP Censor Build #%BUILD% - %COMMIT_MESSAGE%
|
||||
* **update_only** [optional, bool, true|false] - Whether the deployment should only be run if the currently deployed branches matches the one being built. Default - true
|
||||
|
||||
### Examples
|
||||
|
|
@ -18,6 +18,6 @@ Configuration
|
|||
success:
|
||||
deployer:
|
||||
webhook_url: "https://deployer.example.com/deploy/QZaF1bMIUqbMFTmKDmgytUuykRN0cjCgW9SooTnwkIGETAYhDTTYoR8C431t"
|
||||
reason: "PHPCI Build #%BUILD% - %COMMIT_MESSAGE%"
|
||||
reason: "PHP Censor Build #%BUILD% - %COMMIT_MESSAGE%"
|
||||
update_only: true
|
||||
```
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Configuration
|
|||
|
||||
### Examples
|
||||
|
||||
See [Adding PHPCI Support to Your Projects](https://www.phptesting.org/wiki/Adding-PHPCI-Support-to-Your-Projects) for more information about how to configure plugins.
|
||||
See [Adding PHP Censor Support to Your Projects](../config.md) for more information about how to configure plugins.
|
||||
|
||||
Send an email to the committer as well as one@exameple.com if a build fails:
|
||||
```yml
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Plugin Env
|
||||
----------
|
||||
|
||||
Sets environment variables on the PHPCI server for the build.
|
||||
Sets environment variables on the PHP Censor server for the build.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ Configuration
|
|||
### Options
|
||||
|
||||
- **directory** [string, optional] - The directory in which to run Grunt (defaults to build root.)
|
||||
- **grunt** [string, optional] - Allows you to provide a path to Grunt (defaults to PHPCI root, vendor/bin, or a system-provided Grunt).
|
||||
- **grunt** [string, optional] - Allows you to provide a path to Grunt (defaults to PHP Censor root, vendor/bin, or a system-provided Grunt).
|
||||
- **gruntfile** [string, optional] - Gruntfile to run (defaults to `Gruntfile.js`).
|
||||
- **task** [string, optional] - The Grunt task to run.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Plugin PHP Parallel Lint
|
||||
------------------------
|
||||
|
||||
Similar to the [standard PHP Lint plugin](https://github.com/Block8/PHPCI/wiki/Lint-plugin), except that it uses the [PHP Parallel Lint](https://github.com/JakubOnderka/PHP-Parallel-Lint) project to run.
|
||||
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
|
||||
=============
|
||||
|
|
|
|||
|
|
@ -39,8 +39,8 @@ test:
|
|||
Troubleshooting
|
||||
===============
|
||||
|
||||
If standard logging of PHPCI 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 PHPCI to get all of its dependencies
|
||||
* If phpunit is inside of the project's composer.json, it might interfere with PHPCI's phpunit installation
|
||||
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
|
||||
* If phpunit is inside of the project's composer.json, it might interfere with PHP Censor's phpunit installation
|
||||
* Make sure you have XDebug installed.`The Xdebug extension is not loaded. No code coverage will be generated.`
|
||||
Otherwise test report parsing in `TapParser` will fail, wanting coverage report as well `Invalid TAP string, number of tests does not match specified test count.`
|
||||
|
|
|
|||
|
|
@ -3,19 +3,6 @@ Plugin Shell
|
|||
|
||||
Runs a given Shell command.
|
||||
|
||||
**Note: ** Because this plugin could potentially be abused, it requires extra steps to enable it:
|
||||
|
||||
1. In the root of your PHPCI system, in the same directory where you'll find composer.json and vars.php, look for a file local_vars.php. If it does not exist, create it.
|
||||
2. In local_vars.php add this code:
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
define('ENABLE_SHELL_PLUGIN', true);
|
||||
```
|
||||
|
||||
If `ENABLE_SHELL_PLUGIN` is either false or undefined, the shell plugin won't work.
|
||||
|
||||
Configuration
|
||||
=============
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Configuration
|
|||
|-------|-----------|-------------|
|
||||
| `webhook_url` | Yes | The URL to your Slack WebHook |
|
||||
| `room` | No | Your Slack room name. Default - #phpci |
|
||||
| `username` | No | The name to send the message as. Default - PHPCI |
|
||||
| `username` | No | The name to send the message as. Default - PHP Censor |
|
||||
| `icon` | No | The URL to the user icon or an emoji such as :ghost:. Default - The value configured on Slack's WebHook setup |
|
||||
| `message` | No | The message to send to the room. Default - `<%PROJECT_URI%|%PROJECT_TITLE%> - <%BUILD_URI%|Build #%BUILD%> has finished for commit <%COMMIT_URI%|%SHORT_COMMIT% (%COMMIT_EMAIL%)> on branch <%BRANCH_URI%|%BRANCH%>` |
|
||||
| `show_status` | No | Whether or not to append the build status as an attachment in slack. Default - true
|
||||
|
|
@ -24,8 +24,8 @@ Send a message if the build fails:
|
|||
failure:
|
||||
slack_notify:
|
||||
webhook_url: "https://hooks.slack.com/services/R212T827A/G983UY31U/aIp0yuW9u0iTqwAMOEwTg"
|
||||
room: "#phpci"
|
||||
username: "PHPCI"
|
||||
room: "#php-censor"
|
||||
username: "PHP Censor"
|
||||
icon: ":ghost:"
|
||||
message: "%PROJECT_TITLE% - build %BUILD% failed! :angry:"
|
||||
show_status: false
|
||||
|
|
@ -37,8 +37,8 @@ Send a message if the build is successful:
|
|||
success:
|
||||
slack_notify:
|
||||
webhook_url: "https://hooks.slack.com/services/R212T827A/G983UY31U/aIp0yuW9u0iTqwAMOEwTg"
|
||||
room: "#phpci"
|
||||
username: "PHPCI"
|
||||
room: "#php-censor"
|
||||
username: "PHP Censor"
|
||||
icon: ":ghost:"
|
||||
message: "%PROJECT_TITLE% - build %BUILD% succeeded! :smiley:"
|
||||
show_status: false
|
||||
|
|
@ -50,8 +50,8 @@ Send a message every time the build runs:
|
|||
complete:
|
||||
slack_notify:
|
||||
webhook_url: "https://hooks.slack.com/services/R212T827A/G983UY31U/aIp0yuW9u0iTqwAMOEwTg"
|
||||
room: "#phpci"
|
||||
username: "PHPCI"
|
||||
room: "#php-censor"
|
||||
username: "PHP Censor"
|
||||
icon: ":ghost:"
|
||||
message: "%PROJECT_TITLE% - build %BUILD% completed"
|
||||
show_status: true
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ 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:
|
||||
|
||||
1. Log into PHPCI.
|
||||
1. Log into PHP Censor.
|
||||
2. Click on your Bitbucket project.
|
||||
3. Copy the web hook link specified on the left.
|
||||
4. Log into Bitbucket and go to your repo.
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ 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:
|
||||
|
||||
1. Log into PHPCI.
|
||||
1. Log into PHP Censor.
|
||||
2. Click on your GitHub project.
|
||||
3. Copy the web hook link specified on the right of the page.
|
||||
4. Log into GitHub and go to your repository.
|
||||
5. Click the settings icon on the lower right sidebar.
|
||||
6. Click on "Webhooks & Services".
|
||||
7. Add your web hook link you copied above, and specify when you would like it to run.
|
||||
8. Add the public key for the project in PHPCI to the deploy keys for the repository on GitHub.
|
||||
9. Verify that the initial test delivery was successful. If not, make sure that your PHPCI machine is reachable from the internet.
|
||||
8. Add the public key for the project in PHP Censor to the deploy keys for the repository on GitHub.
|
||||
9. Verify that the initial test delivery was successful. If not, make sure that your PHP Censor machine is reachable from the internet.
|
||||
|
|
|
|||
|
|
@ -3,12 +3,12 @@ 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:
|
||||
|
||||
1. Log into PHPCI.
|
||||
1. Log into PHP Censor.
|
||||
2. Click on your Gitlab project.
|
||||
3. Copy the web hook link specified on the left.
|
||||
4. Log into Gitlab and go to your repo.
|
||||
5. Click the "settings" tab in the top right corner of the page.
|
||||
6. Click on "Web Hooks".
|
||||
7. Paste the link you copied from PHPCI into the "URL" textbox.
|
||||
8. Select the events which you want to trigger a PHPCI build. The default and recommended setup is to only enable "push events."
|
||||
7. Paste the link you copied from PHP Censor into the "URL" textbox.
|
||||
8. Select the events which you want to trigger a PHP Censor build. The default and recommended setup is to only enable "push events."
|
||||
9. Click "Add Web Hook," and verify that the test was successful.
|
||||
|
|
|
|||
|
|
@ -4,31 +4,31 @@ 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) - PHPCI is no different.
|
||||
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.
|
||||
|
||||
You can find the status image at the following location: `http://{PHPCI URL}/build-status/image/{PROJECT ID}`
|
||||
You can find the status image at the following location: `http://{PHP_CENSOR_URL}/build-status/image/{PROJECT ID}`
|
||||
|
||||
So for example, our instance of PHPCI is at `phpci.block8.net`, and our PHPCI project ID is `2`, so the image URL is: `http://phpci.block8.net/build-status/image/2`.
|
||||
So for example, our instance of PHP Censor is at `php-censor.local`, and our PHP Censor project ID is `2`, so the image URL is: `http://php-censor.local/build-status/image/2`.
|
||||
|
||||
Example:
|
||||
|
||||

|
||||

|
||||
|
||||
Status Page
|
||||
===========
|
||||
|
||||
PHPCI also provides a public project status page, that is accessible for everyone.
|
||||
PHP Censor also provides a public project status page, that is accessible for everyone.
|
||||
|
||||
You can find the status page at the following location: `http://{PHPCI URL}/build-status/view/{PROJECT ID}`
|
||||
You can find the status page at the following location: `http://{PHP_CENSOR_URL}/build-status/view/{PROJECT ID}`
|
||||
|
||||
Example:
|
||||
http://phpci.block8.net/build-status/view/2
|
||||
http://php-censor.local/build-status/view/2
|
||||
|
||||
### Where do I find my project ID?
|
||||
Go to your instance of PHPCI, and open the project you are interested in. The project ID is the number in the last part of the URL in your browser.
|
||||
Go to your instance of PHP Censor, and open the project you are interested in. The project ID is the number in the last part of the URL in your browser.
|
||||
|
||||
Example:
|
||||
http://phpci.block8.net/project/view/2 ~> PROJECT ID: `2`
|
||||
http://php-censor.local/project/view/2 ~> PROJECT ID: `2`
|
||||
|
||||
### Enable/disable status image and page
|
||||
You can enable or disable access to the public status image and page in your project's settings.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
Updating PHPCI
|
||||
--------------
|
||||
Updating PHP Censor
|
||||
-------------------
|
||||
|
||||
Updating PHPCI 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.
|
||||
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.
|
||||
|
||||
1. Go to your PHPCI root folder in a Terminal.
|
||||
1. Go to your PHP Censor root folder in a Terminal.
|
||||
2. Pull the latest code. This would look like this: `git pull`
|
||||
3. Update the PHPCI database: `./console phpci:update`
|
||||
3. Update the PHP Censor database: `./console phpci:update`
|
||||
4. Update the composer and its packages: `composer self-update && composer update`
|
||||
5. Return to the PHPCI admin screens and check your desired plugins are still installed correctly.
|
||||
5. Return to the PHP Censor admin screens and check your desired plugins are still installed correctly.
|
||||
7. Run a build to make sure everything is working as expected.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Adding a Virtual Host
|
||||
---------------------
|
||||
|
||||
In order to access the PHPCI web interface, you need to set up a virtual host in your web server.
|
||||
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.
|
||||
|
||||
|
|
@ -31,7 +31,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 PHPCI `/public` directory.
|
||||
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.
|
||||
|
||||
```
|
||||
<IfModule mod_rewrite.c>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
Run Builds Using Cron
|
||||
---------------------
|
||||
|
||||
Running builds using cron is a quick and simple method of getting up and running with PHPCI. It also removes the need for PHPCI to be running all the time.
|
||||
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 PHPCI runs, you may want to [set up the PHPCI daemon](workers/daemon.md) instead.
|
||||
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 PHPCI to run as a regular cronjob, so run `crontab -e` and enter the following:
|
||||
You'll want to set up PHP Censor to run as a regular cronjob, so run `crontab -e` and enter the following:
|
||||
|
||||
```sh
|
||||
* * * * * /usr/bin/php /path/to/phpci/console phpci:run-builds
|
||||
```
|
||||
|
||||
**Note:** Make sure you change the `/path/to/phpci` to the directory in which you installed PHPCI, and update the PHP path if necessary.
|
||||
**Note:** Make sure you change the `/path/to/phpci` to the directory in which you installed PHP Censor, and update the PHP path if necessary.
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
Run Builds Using a Daemon
|
||||
-------------------------
|
||||
|
||||
The PHPCI 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.
|
||||
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.
|
||||
|
||||
The daemon is also useful if you want to run multiple PHPCI workers in a virtualised environment (i.e. Docker)
|
||||
The daemon is also useful if you want to run multiple PHP Censor workers in a virtualised environment (i.e. Docker)
|
||||
|
||||
If you want to run PHPCI builds on a regular schedule instead, you should [set up a cron-job](workers/cron.md).
|
||||
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
|
||||
===================
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
Run Builds Using a Worker
|
||||
-------------------------
|
||||
|
||||
The PHPCI Worker (added in v1.7) 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.
|
||||
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.
|
||||
|
||||
The worker is the recommended way to run PHPCI builds. You can run several workers all watching one queue, allowing jobs to be run simultaneously without the overhead of polling your MySQL database.
|
||||
The worker is the recommended way to run PHP Censor builds. You can run several workers all watching one queue, allowing jobs to be run simultaneously without the overhead of polling your MySQL database.
|
||||
|
||||
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).
|
||||
|
||||
|
|
@ -13,25 +13,25 @@ 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 PHPCI Worker
|
||||
===========================
|
||||
Setting up the PHP Censor worker
|
||||
================================
|
||||
|
||||
### On a new installation
|
||||
|
||||
Setting up the worker on a new installation of PHPCI is as simple as entering the appropriate values for your Beanstalkd server hostname and queue name when running the PHPCI installer. By default, the installer assumes that you'll be using beanstalkd on `localhost` and will use the queue name `phpci`.
|
||||
Setting up the worker on a new installation of PHP Censor is as simple as entering the appropriate values for your Beanstalkd server hostname and queue name when running the PHP Censor installer. By default, the installer assumes that you'll be using beanstalkd on `localhost` and will use the queue name `phpci`.
|
||||
|
||||

|
||||

|
||||
|
||||
### On an existing installation
|
||||
|
||||
On an existing installation, to set up the worker, you simply need to add the beanstalkd host and queue names directly into your `/PHPCI/config.yml` file. You should add a `worker` key beneath the `phpci` section, with the properties `host` and `queue` as outlined in the screenshot below:
|
||||
On an existing installation, to set up the worker, you simply need to add the beanstalkd host and queue names directly into your `config.yml` file. You should add a `worker` key beneath the `phpci` section, with the properties `host` and `queue` as outlined in the screenshot below:
|
||||
|
||||

|
||||

|
||||
|
||||
Running the PHPCI Worker
|
||||
========================
|
||||
Running the PHP Censor worker
|
||||
=============================
|
||||
|
||||
Once you've set up PHPCI 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.
|
||||
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.
|
||||
|
||||
Using your preferred text editor, create a file named `phpci.conf` under `/etc/supervisor/conf.d`. In it, enter the following config:
|
||||
|
||||
|
|
@ -48,9 +48,9 @@ environment=HOME="/home/phpci",USER="phpci"
|
|||
numprocs=2
|
||||
```
|
||||
|
||||
You'll need to edit the '/path/to/phpci', the `user` value and the `environment` value to suit your server. The user needs to be an actual system user with suitable permissions to execute PHP and PHPCI.
|
||||
You'll need to edit the '/path/to/phpci', the `user` value and the `environment` value to suit your server. The user needs to be an actual system user with suitable permissions to execute PHP and PHP Censor.
|
||||
|
||||
Once you've created this file, simply restart supervisord using the command `service supervisor restart` and 2 instances of PHPCI's worker should start immediately. You can verify this by running the command `ps aux | grep phpci`, which should give you output as follows:
|
||||
Once you've created this file, simply restart supervisord using the command `service supervisor restart` and 2 instances of PHP Censor's worker should start immediately. You can verify this by running the command `ps aux | grep phpci`, which should give you output as follows:
|
||||
|
||||
```
|
||||
➜ ~ ps aux | grep phpci
|
||||
|
|
@ -58,4 +58,4 @@ phpci 19057 0.0 0.9 200244 18720 ? S 03:00 0:01 php /phpci/cons
|
|||
phpci 19058 0.0 0.9 200244 18860 ? S 03:00 0:01 php /phpci/console phpci:worker
|
||||
```
|
||||
|
||||
That's it! Now, whenever you create a new build in PHPCI, it should start building immediately.
|
||||
That's it! Now, whenever you create a new build in PHP Censor, it should start building immediately.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue