Last active
April 5, 2018 15:09
-
-
Save yilmazerhakan/67c8639a4e15c6c1123b to your computer and use it in GitHub Desktop.
Installing Jenkins on Homestead / Laravel
This file contains hidden or 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
# Installing Jenkins for PHP Continious Integration of laravel/homestead | |
# 8 Must Have PHP Quality Assurance Tools | |
composer global require "phpunit/phpunit=4.1.*" | |
composer global require behat/behat='~3.0.6' | |
composer global require 'phploc/phploc=*' | |
composer global require 'phpmd/phpmd=*' | |
composer global require 'squizlabs/php_codesniffer=*' | |
composer global require 'sebastian/phpcpd=*' | |
composer global require 'sebastian/phpdcd=*' | |
# Update | |
sudo apt-get update | |
# Install php5-xsl | |
sudo apt-get install php5-xsl | |
# Install Jenkins | |
wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - | |
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list' | |
sudo apt-get update | |
sudo apt-get install jenkins | |
# set 8080 port for nginx | |
sudo sed '/listen 80;/a listen 8080;' /etc/nginx/sites-available/homestead.app | |
sudo service nginx restart | |
#get the php job 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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment