Browse Source

Merge pull request #627 from qadan/7.x-ISLANDORA-1149

java downloadin'
pull/630/head
Nick Ruest 9 years ago
parent
commit
9ef1328448
  1. 1
      .travis.yml
  2. 28
      tests/scripts/travis_setup.sh

1
.travis.yml

@ -11,6 +11,7 @@ env:
- FEDORA_VERSION="3.5" - FEDORA_VERSION="3.5"
- FEDORA_VERSION="3.6.2" - FEDORA_VERSION="3.6.2"
- FEDORA_VERSION="3.7.0" - FEDORA_VERSION="3.7.0"
- FEDORA_VERSION="3.8.1"
global: global:
# This key is unique to the Islandora/islandora repository; logging will # This key is unique to the Islandora/islandora repository; logging will
# fail on forked repositories unless a new unique key is generated for them. # fail on forked repositories unless a new unique key is generated for them.

28
tests/scripts/travis_setup.sh

@ -1,8 +1,21 @@
#!/bin/bash #!/bin/bash
# Database creation and priveleges.
mysql -u root -e 'create database drupal;' mysql -u root -e 'create database drupal;'
mysql -u root -e "create database fedora;" mysql -u root -e "create database fedora;"
mysql -u root -e "GRANT ALL PRIVILEGES ON fedora.* To 'fedora'@'localhost' IDENTIFIED BY 'fedora';" mysql -u root -e "GRANT ALL PRIVILEGES ON fedora.* To 'fedora'@'localhost' IDENTIFIED BY 'fedora';"
mysql -u root -e "GRANT ALL PRIVILEGES ON drupal.* To 'drupal'@'localhost' IDENTIFIED BY 'drupal';" mysql -u root -e "GRANT ALL PRIVILEGES ON drupal.* To 'drupal'@'localhost' IDENTIFIED BY 'drupal';"
# Java 8, if needed.
if [ $FEDORA_VERSION = "3.8.1" ]; then
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
sudo apt-get install -y oracle-java8-installer oracle-java8-set-default
sudo update-java-alternatives -s java-8-oracle
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
fi
# Islandora Tomcat installation.
cd $HOME cd $HOME
git clone git://github.com/Islandora/tuque.git git clone git://github.com/Islandora/tuque.git
wget http://alpha.library.yorku.ca/islandora_tomcat.$FEDORA_VERSION.tar.gz wget http://alpha.library.yorku.ca/islandora_tomcat.$FEDORA_VERSION.tar.gz
@ -10,34 +23,47 @@ tar xf islandora_tomcat.$FEDORA_VERSION.tar.gz
cd islandora_tomcat cd islandora_tomcat
export CATALINA_HOME='.' export CATALINA_HOME='.'
export JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -Djavax.net.ssl.trustStore=$CATALINA_HOME/fedora/server/truststore -Djavax.net.ssl.trustStorePassword=tomcat" export JAVA_OPTS="-Xms1024m -Xmx1024m -XX:MaxPermSize=512m -XX:+CMSClassUnloadingEnabled -Djavax.net.ssl.trustStore=$CATALINA_HOME/fedora/server/truststore -Djavax.net.ssl.trustStorePassword=tomcat"
# TODO: roll a Fedora 3.8.1 islandora_tomcat that doesn't require a rebuild.
if [ $FEDORA_VERSION = "3.8.1" ]; then
export FEDORA_HOME=fedora
./fedora/server/bin/fedora-rebuild.sh -r org.fcrepo.server.utilities.rebuild.SQLRebuilder
fi
./bin/startup.sh ./bin/startup.sh
# Drush installation.
cd $HOME cd $HOME
pear channel-discover pear.drush.org pear channel-discover pear.drush.org
pear upgrade --force Console_Getopt pear upgrade --force Console_Getopt
pear upgrade --force pear pear upgrade --force pear
pear channel-discover pear.drush.org pear channel-discover pear.drush.org
wget http://alpha.library.yorku.ca/drush-6.3.tar.gz wget http://alpha.library.yorku.ca/drush-6.3.tar.gz
tar xf drush-6.3.tar.gz tar xf drush-6.3.tar.gz
sudo mv drush-6.3 /opt/ sudo mv drush-6.3 /opt/
sudo ln -s /opt/drush-6.3/drush /usr/bin/drush sudo ln -s /opt/drush-6.3/drush /usr/bin/drush
# PHPCS installation.
wget http://alpha.library.yorku.ca/PHP_CodeSniffer-1.5.6.tgz wget http://alpha.library.yorku.ca/PHP_CodeSniffer-1.5.6.tgz
pear install PHP_CodeSniffer-1.5.6.tgz pear install PHP_CodeSniffer-1.5.6.tgz
# PHP Copy-Paste Detection installation.
wget http://alpha.library.yorku.ca/phpcpd.phar wget http://alpha.library.yorku.ca/phpcpd.phar
sudo mv phpcpd.phar /usr/local/bin/phpcpd sudo mv phpcpd.phar /usr/local/bin/phpcpd
sudo chmod +x /usr/local/bin/phpcpd sudo chmod +x /usr/local/bin/phpcpd
# Drupal installation.
phpenv rehash phpenv rehash
drush dl --yes drupal drush dl --yes drupal
cd drupal-* cd drupal-*
drush si minimal --db-url=mysql://drupal:drupal@localhost/drupal --yes drush si minimal --db-url=mysql://drupal:drupal@localhost/drupal --yes
drush runserver --php-cgi=$HOME/.phpenv/shims/php-cgi localhost:8081 &>/tmp/drush_webserver.log & drush runserver --php-cgi=$HOME/.phpenv/shims/php-cgi localhost:8081 &>/tmp/drush_webserver.log &
# Add Islandora to the list of symlinked modules.
ln -s $ISLANDORA_DIR sites/all/modules/islandora ln -s $ISLANDORA_DIR sites/all/modules/islandora
# Use our custom Travis test config for Simpletest.
mv sites/all/modules/islandora/tests/travis.test_config.ini sites/all/modules/islandora/tests/test_config.ini mv sites/all/modules/islandora/tests/travis.test_config.ini sites/all/modules/islandora/tests/test_config.ini
# Grab Tuque.
mkdir sites/all/libraries mkdir sites/all/libraries
ln -s $HOME/tuque sites/all/libraries/tuque ln -s $HOME/tuque sites/all/libraries/tuque
# Grab and enable other modules.
drush dl --yes coder-7.x-2.4 drush dl --yes coder-7.x-2.4
drush dl --yes potx-7.x-1.0 drush dl --yes potx-7.x-1.0
drush en --yes coder_review drush en --yes coder_review

Loading…
Cancel
Save