Fixed namespaces in docblocks (PHPCI -> PHPCensor)
This commit is contained in:
parent
41407e1d15
commit
32f5c01728
89 changed files with 167 additions and 168 deletions
|
|
@ -33,7 +33,7 @@ How to write to the Log (For people creating a new plugin)
|
|||
|
||||
For plugin creators the simplest way to get hold of an error logger is to add a parameter to the constructor and typehint on 'Psr\Log\LoggerInterface'. The code that loads your plugin will automatically inject the logger when it sees this. For example:
|
||||
```php
|
||||
class ExampleLoggingPlugin implements \PHPCI\Plugin
|
||||
class ExampleLoggingPlugin implements \PHPCensor\Plugin
|
||||
{
|
||||
protected $log;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@ phing:
|
|||
targets:
|
||||
- "build:test"
|
||||
properties:
|
||||
config_file: "PHPCI"
|
||||
config_file: "php-censor"
|
||||
```
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ For use with an existing project:
|
|||
test:
|
||||
php_code_sniffer:
|
||||
standard: "/phpcs.xml" # The leading slash is needed to trigger an external ruleset.
|
||||
# Without it, PHPCI looks for a rule named "phpcs.xml"
|
||||
# Without it, PHP Censor looks for a rule named "phpcs.xml"
|
||||
allowed_errors: -1 # Even a single error will cause the build to fail. -1 = unlimited
|
||||
allowed_warnings: -1
|
||||
```
|
||||
|
|
|
|||
|
|
@ -37,6 +37,6 @@ complete:
|
|||
- "recipient2@jabber.org"
|
||||
server: "gtalk.google.com"
|
||||
tls: 1
|
||||
alias: "PHPCi Notification"
|
||||
alias: "PHP Censor Notification"
|
||||
date_format: "%d/%m/%Y"
|
||||
```
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Installation
|
|||
#!/bin/sh
|
||||
|
||||
PROJECT_ID=1
|
||||
APP_URL="http://my.server.com/PHPCI/"
|
||||
APP_URL="http://my.server.com/php-censor/"
|
||||
|
||||
trigger_hook() {
|
||||
NEWREV="$2"
|
||||
|
|
|
|||
|
|
@ -13,10 +13,10 @@ server {
|
|||
... standard virtual host ...
|
||||
|
||||
location / {
|
||||
try_files $uri @phpci;
|
||||
try_files $uri @php-censor;
|
||||
}
|
||||
|
||||
location @phpci {
|
||||
location @php-censor {
|
||||
# Pass to FastCGI:
|
||||
fastcgi_pass unix:/path/to/phpfpm.sock;
|
||||
fastcgi_index index.php;
|
||||
|
|
@ -47,23 +47,22 @@ For Apache, you can use a standard virtual host, as long as your server supports
|
|||
```
|
||||
<VirtualHost *:80>
|
||||
ServerAdmin user@domain.com
|
||||
DocumentRoot /var/www/phpci/public
|
||||
ServerName phpci.vagrant
|
||||
ServerAlias phpci.vagrant
|
||||
DocumentRoot /var/www/php-censor.local/public
|
||||
ServerName php-censor.local
|
||||
|
||||
<Directory /var/www/phpci/public/>
|
||||
<Directory /var/www/php-censor.local/public/>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
ErrorLog ${APACHE_LOG_DIR}/phpci-error_log
|
||||
CustomLog ${APACHE_LOG_DIR}/phpci-access_log combined
|
||||
ErrorLog ${APACHE_LOG_DIR}/php-censor-error_log
|
||||
CustomLog ${APACHE_LOG_DIR}/php-censor-access_log combined
|
||||
</VirtualHost>
|
||||
```
|
||||
|
||||
- Add in /etc/hosts
|
||||
```
|
||||
127.0.0.1 phpci.vagrant
|
||||
127.0.0.1 php-censor.local
|
||||
```
|
||||
|
||||
Built-in PHP Server Example
|
||||
|
|
|
|||
|
|
@ -11,10 +11,7 @@ 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:
|
||||
|
||||
```sh
|
||||
* * * * * /usr/bin/php /path/to/phpci/console php-censor:run-builds
|
||||
|
||||
# For backward compatibility with PHPCI
|
||||
* * * * * /usr/bin/php /path/to/phpci/console phpci:run-builds
|
||||
* * * * * /usr/bin/php /path/to/php-censor/console php-censor:run-builds
|
||||
```
|
||||
|
||||
**Note:** Make sure you change the `/path/to/php-censor` to the directory in which you installed PHP Censor, and update the PHP path if necessary.
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@ 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:
|
||||
|
||||
```sh
|
||||
nohup php ./daemonise phpci:daemonise >/dev/null 2>&1 &
|
||||
nohup php ./daemonise php-censor:daemonise >/dev/null 2>&1 &
|
||||
```
|
||||
|
||||
If you need to debug what's going on with your builds, you can also run the daemon directly using the following command, which will output the daemon's log directly to your terminal:
|
||||
|
||||
```sh
|
||||
php daemonise phpci:daemonise
|
||||
php daemonise php-censor:daemonise
|
||||
```
|
||||
|
|
|
|||
|
|
@ -36,15 +36,15 @@ Once you've set up PHP Censor to add your jobs to a beanstalkd queue, you need t
|
|||
Using your preferred text editor, create a file named `php-censor.conf` under `/etc/supervisor/conf.d`. In it, enter the following config:
|
||||
|
||||
```
|
||||
[program:phpci]
|
||||
command=/path/to/phpci/latest/console phpci:worker
|
||||
[program:php-censor]
|
||||
command=/path/to/php-censor/latest/console php-censor:worker
|
||||
process_name=%(program_name)s_%(process_num)02d
|
||||
stdout_logfile=/var/log/phpci.log
|
||||
stderr_logfile=/var/log/phpci-err.log
|
||||
user=phpci
|
||||
stdout_logfile=/var/log/php-censor.log
|
||||
stderr_logfile=/var/log/php-censor-err.log
|
||||
user=php-censor
|
||||
autostart=true
|
||||
autorestart=true
|
||||
environment=HOME="/home/phpci",USER="phpci"
|
||||
environment=HOME="/home/php-censor",USER="php-censor"
|
||||
numprocs=2
|
||||
```
|
||||
|
||||
|
|
@ -53,9 +53,9 @@ You'll need to edit the '/path/to/php-censor', the `user` value and the `environ
|
|||
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 php-censor`, which should give you output as follows:
|
||||
|
||||
```
|
||||
➜ ~ ps aux | grep phpci
|
||||
phpci 19057 0.0 0.9 200244 18720 ? S 03:00 0:01 php /phpci/console phpci:worker
|
||||
phpci 19058 0.0 0.9 200244 18860 ? S 03:00 0:01 php /phpci/console phpci:worker
|
||||
➜ ~ ps aux | grep php-censor
|
||||
php-censor 19057 0.0 0.9 200244 18720 ? S 03:00 0:01 php /php-censor/console php-censor:worker
|
||||
php-censor 19058 0.0 0.9 200244 18860 ? S 03:00 0:01 php /php-censor/console php-censor:worker
|
||||
```
|
||||
|
||||
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