Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Continuousintegrationwith drupal installationguide

303 views

Published on

Additional materials for Continuous Integration session.

Published in: Internet
  • Be the first to comment

  • Be the first to like this

Continuousintegrationwith drupal installationguide

  1. 1. Continuous integration environment installation Ubuntu 14.04 LAMP sudo apt-get install lamp-server^ sudo a2enmod rewrite sudo apt-get install php-pear sudo apt-get install php5-curl sudo apt-get install php5-gd sudo service apache2 restart 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 Jenkins should be available at: ​http://127.0.0.1:8080/ Perform security setup Set up Matrix-based Security following this documentation page https://wiki.jenkins-ci.org/display/JENKINS/Standard+Security+Setup Install Jenkins plugins http://127.0.0.1:8080/pluginManager/available You’ll need: ● Static Analysis Collector Plug-in ● Checkstyle ● Phing ● Plot ● GIT plugin
  2. 2. Composer curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer Drush composer global require drush/drush:7.* Add Drush to your system path by placing export PATH="$HOME/.composer/vendor/bin:$PATH" to the .bashrc vim ~/.bashrc source ~/.bashrc Phing sudo pear channel-discover pear.phing.info sudo pear channel-discover pear.pdepend.org sudo pear channel-discover components.ez.no sudo pear channel-discover pear.symfony-project.com sudo pear install [--alldeps] phing/phing sudo pear install PHP_CodeSniffer sudo pear install HTTP_Request2 PHPUnit wget https://phar.phpunit.de/phpunit.phar chmod +x phpunit.phar sudo mv phpunit.phar /usr/local/bin/phpunit Git sudo apt-get install git BitBucket (or another) ● Example project: ​https://bitbucket.org/drupalcampbaltics/jenkinslovesdrupal/overview ● Create repository
  3. 3. ● Generate account keys or add deployment keys to repository if already having account keys ● Follow links ○ https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-and-mercurial-on-mac- osx-linux-270827678.html ○ http://joekratzat.com/blog/2013/jenkins-and-bitbucket/ Setup local site (optional) Create database mysqladmin -uroot -ppassword create drupal Clone project cd /var/www git clone https://bitbucket.org/drupalcampbaltics/jenkinslovesdrupal.git drupal-demo Build and install site drush make profiles/sample_profile/sample_profile.make -y drush si sample_profile --account-name=admin --account-pass=admin --db-url=mysql://root:password@localhost/drupal -y -v Configure Apache virtual host <VirtualHost *:80> ServerAdmin me@myserver DocumentRoot /var/www/drupal-demo ServerName www.drupal.loc ServerAlias drupal.loc *.drupal.loc <Directory /var/www/drupal-demo> Options FollowSymlinks AllowOverride All </Directory> </VirtualHost> Add alias to /etc/hosts file: 127.0.0.1 drupal.loc Configure Jenkins credentials You may add generate ssh key to the credentials list and use in job. http://127.0.0.1:8080/credentials/ Create Jenkins Job …
  4. 4. https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu http://reload.github.io/phing-drupal-template/ https://wiki.jenkins-ci.org/display/JENKINS/Drupal+Development https://www.drupal.org/project/phingdrushtask

×