Created
December 21, 2014 11:02
-
-
Save ccamara/e510c039960081843138 to your computer and use it in GitHub Desktop.
Have Travis CI Install Drupal. Source http://dropbucket.org/node/1761 #CI
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
language: php | |
php: | |
- 5.3 | |
- 5.4 | |
- 5.5 | |
- hhvm | |
matrix: | |
allow-failures: | |
- php: hhvm | |
env: | |
global: | |
- ES_VER=1.0.1 | |
- ES_MAPPER_ATTACHMENTS_VER=2.0.0.RC1 | |
- ES_TRANSPORT_THRIFT_VER=2.0.0.RC1 | |
- ES_GEOCLUSTER_FACET_VER=0.0.10 | |
- ES_WAIT_ON_MAPPING_CHANGE=true | |
- DATABASE='drupal' | |
- DB_USERNAME='root' | |
- DB_ENCODE='utf8' | |
matrix: | |
- DRUPAL_3RD_PARTY='composer_manager' | |
- DRUPAL_3RD_PARTY='libraries' | |
mysql: | |
database: $DATABASE | |
username: $DB_USERNAME | |
encoding: $DB_ENCODE | |
before_install: | |
- export UPDATE TRAVIS_BUILD_DIR | |
- BUILD_TOP=`dirname $TRAVIS_BUILD_DIR` | |
- EXIT_VALUE=0 | |
- sudo apt-get update > /dev/null | |
- composer self-update | |
install: | |
# install php packages required for running a web server from drush on php 5.3 | |
- sudo apt-get install -y --force-yes php5-cgi php5-mysql | |
# install drush globally | |
- composer global require drush/drush:6.* | |
# add composer's global bin directory to the path | |
# see: https://github.com/drush-ops/drush#install---composer | |
- export PATH="$HOME/.composer/vendor/bin:$PATH" | |
before_script: | |
#- echo 'sendmail_path = /bin/true' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini | |
# establish drupal package put in place the right way | |
- sudo mkdir -p /var/www | |
- sudo chown travis:travis /var/www | |
- drush dl drupal --destination=/var/www --default-major=7 --drupal-project-rename=drupal --y | |
# setup some drush stuff | |
- sudo chown -R travis:travis ~/.drush | |
- cd ~/.drush/ | |
# get some plugins good for testing and building systems rapidly | |
- drush dl drush_recipes, registry_rebuild, drush_ecl --y | |
- drush cc drush | |
script: | |
# stand up drupal | |
- cd /var/www/drupal | |
- drush site-install -y --db-url=mysql://root@localhost/travisdb --db-su='root' --db-su-pw='' | |
# @todo put the other stuff here to build but this should give us a site | |
- cd /var/www/drupal/sites/all/modules | |
after_script: | |
- drush status | |
notifications: | |
# add your IRC here | |
# irc: irc.freenode.org#{CHANNEL} | |
# email: false | |
# slack: | |
# rooms: | |
# add your slack rooms here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also related: https://github.com/LionsAd/drupal_ti