Last active
August 29, 2015 14:20
-
-
Save albankora/e260b3d391921a26829d to your computer and use it in GitHub Desktop.
Jenkins with php install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#COUTION required plug in if not installed | |
1. sudo apt-get install php5-xsl | |
#install the appropriate required libs for composer global | |
1. composer global require "phing/phing" | |
2. composer global require "phpunit/phpunit" | |
3. composer global require "pdepend/pdepend" | |
4. composer global require "phpmd/phpmd" | |
5. composer global require "phploc/phploc" | |
6. composer global require "squizlabs/php_codesniffer" | |
7. composer global require "mayflower/php-codebrowser" | |
8. composer global require "sebastian/phpcpd" | |
9. composer global require "theseer/phpdox" | |
10. composer global require "theseer/fxsl" | |
# OR add a local copy to composer | |
"require-dev": { | |
"mockery/mockery": "*", | |
"phpunit/phpunit": "*", | |
"phpspec/phpspec": "*", | |
"squizlabs/php_codesniffer": "*", | |
"sebastian/phpcpd": "*", | |
"phploc/phploc": "*", | |
"pdepend/pdepend": "*", | |
"phpmd/phpmd": "*", | |
"theseer/phpdox": "*" | |
}, | |
#add PHP libs to $PATH | |
PATH=$PATH:~/.composer/vendor/bin | |
#install jenkins | |
1. wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
2. sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list' | |
3. sudo apt-get update | |
4. sudo apt-get install jenkins | |
## install Ant ## | |
sudo apt-get update | |
sudo apt-get install ant | |
## Download the comand interface ## | |
wget http://localhost:8080/jnlpJars/jenkins-cli.jar | |
## Load the plugins ## | |
java -jar jenkins-cli.jar -s http://localhost:8080 install-plugin checkstyle cloverphp crap4j dry htmlpublisher jdepend plot pmd violations warnings xunit | |
## Resturt jekins ## | |
java -jar jenkins-cli.jar -s http://localhost:8080 safe-restart | |
## Download and install the template ## | |
curl -L https://raw.githubusercontent.com/sebastianbergmann/php-jenkins-template/master/config.xml | \ | |
java -jar jenkins-cli.jar -s http://localhost:8080 create-job php-template | |
## Reload Configuration ## | |
java -jar jenkins-cli.jar -s http://localhost:8080 reload-configuration |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment