Skip to content

Instantly share code, notes, and snippets.

@galbus
Last active December 11, 2015 17:59
Show Gist options
  • Select an option

  • Save galbus/cbc95fa0d47bdba8b842 to your computer and use it in GitHub Desktop.

Select an option

Save galbus/cbc95fa0d47bdba8b842 to your computer and use it in GitHub Desktop.
Jenkins & Vagrant - Execute on a fresh Amazon EC2 Ubuntu 12.0.4 LTS 32bit
# Execute on a fresh Amazon EC2 Ubuntu 12.0.4 LTS 32bit
# jenkins
sudo wget -q -O - http://pkg.jenkins-ci.org/debian-stable/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
# php, pear (& phpunit)
sudo apt-get install php5 php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
sudo pear upgrade PEAR
sudo pear config-set auto_discover 1
sudo pear install pear.phpqatools.org/phpqatools pear.netpirates.net/phpDox
# ruby & vagrant
sudo apt-get install build-essential curl
curl -L https://get.rvm.io | bash -s stable --ruby
gem install vagrant
# virtualbox
sudo apt-get install dkms linux-headers-`uname -r`
sudo sh -c 'echo deb http://download.virtualbox.org/virtualbox/debian precise contrib > /etc/apt/sources.list.d/virtualbox.list'
wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-4.2
# jenkins config
wget http://127.0.0.1:8080/jnlpJars/jenkins-cli.jar
curl -L http://updates.jenkins-ci.org/update-center.json | sed '1d;$d' | curl -X POST -H 'Accept: application/json' -d @- http://127.0.0.1:8080/updateCenter/byId/default/postBack
java -jar jenkins-cli.jar -s http://127.0.0.1:8080 install-plugin checkstyle cloverphp dry htmlpublisher jdepend plot pmd violations xunit compact-columns cron_column greenballs chucknorris subversion gravatar
curl https://raw.github.com/sebastianbergmann/php-jenkins-template/master/config.xml | java -jar jenkins-cli.jar -s http://127.0.0.1:8080 create-job php-template
java -jar jenkins-cli.jar -s http://127.0.0.1:8080 reload-configuration
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment