PEARのアップグレード+PHPUnitのインストール+Jenkinsインストール

MacOS LionのXampp環境で『PEARのアップグレード+PHPUnitのインストール+Jenkinsインストール』を行う。

PEARのアップグレード

管理者権限とってpearディレクトリへ移動。

sudo su
cd /Applications/xampp/xamppfiles/bin


アップグレード

./pear update-channels
./pear upgrade-all


確認

./pear list

PHPUnitのインストール

上の続き。同じディレクトリ階層・管理者権限。


インストール

./pear config-set auto_discover 1
./pear install pear.phpunit.de/PHPUnit


(オプション)名前からして使いそうなのでこちらもインストール

./pear install phpunit/DbUnit
./pear install phpunit/PHPUnit_Selenium


確認

./phpunit --version

Jenkinsのインストール

Jenkinsインストールの前にPEARから必要なライブラリをインストール。
引き続き上と同じ階層・管理者権限。

./pear channel-discover pear.phing.info
./pear install phing/phing


確認

./phing -v
./pear info phing/phing


JenkinsのMac用パッケージをダウンロード。

http://jenkins-ci.org/


確認

http://localhost:8080/


PHPなのでAvailableタグの以下の項目を有効にする。

Phing Plugin - This plugin allows you to use Phing to build PHP projects.
xUnit Plugin - This plugin makes it possible to publish the test results of an execution of a testing tool in Jenkins.


以上。完了。