diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh new file mode 100755 index 0000000..814d832 --- /dev/null +++ b/scripts/bootstrap.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# Bootstrap a minimal environment required to build +# a Drupal distribution tarball on Ubuntu 12.04LTS (precise) +# + +set -xe + +export DEBIAN_FRONTEND=noninteractive +apt-get update +apt-get install -y unzip php5-mysql php5-gd php5-cli libapache2-mod-php5 mysql-server mysql-client php-pear git + +# install drush 6.0.0 +pear channel-discover pear.drush.org +pear install drush/drush-6.0.0 +pear install Console_Table-1.1.3 + +# add drupal-site-deployment drush extension +wget https://github.com/mkissam/drush-dsd/archive/v0.3.tar.gz -O - | tar -xz +mv drush-dsd-0.3 /usr/share/php/drush/commands/dsd \ No newline at end of file diff --git a/scripts/gate-build.sh b/scripts/gate-build.sh new file mode 100755 index 0000000..5515198 --- /dev/null +++ b/scripts/gate-build.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# +# Gating test script for Community portal +# 1. prepare mysql database +# 2. build distribution tarball +# 3. install "groups" profile +# +# Prerequisites: +# bootstrap.sh required for setup php/drush environment. +# git clone the project into groups directory. +# + +set -xe + +# create mysql database +mysql <~/.drush/aliases.drushrc.php < '/srv/vhosts/groups.local/w', + 'dsd-root' => '/srv/vhosts/groups.local', + 'uri' => 'groups.local', + 'databases' => array( + 'default' => array( + 'driver' => 'mysql', + 'username' => 'groups', + 'password' => 'password', + 'port' => '', + 'host' => 'localhost', + 'database' => 'groups', + ), + ), + 'file-owner' => 'root', + 'file-group' => 'www-data', + 'variables' => array( + 'site_name' => 'Groups Test Deployment', + ), + 'profile' => 'groups', + 'default-admin-password' => 'admin', +); +EOF + +mkdir -p /srv/vhosts/groups.local +drush dsd-init @groups-dev groups-snapshot.tar.gz +drush @groups-dev status \ No newline at end of file