summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Pugh2016-08-16 15:47:14 -0400
committerJon Pugh2016-08-16 15:47:14 -0400
commit344ed921078bfa9cdec4933dd5a0e4494ad2a89b (patch)
tree4dcb6f430e762ce170cc8d4b6d67450eb35aa4f5
parent99deaef1f433747a3fdfaf5d0beb8307b1ec6a6b (diff)
parentfcbb79bb1146b9008e5a46b97f980e47d6e4fde2 (diff)
Merge branch '7.x-3.x' into feature/1694792-addregistry-rebuildfeature/1694792-addregistry-rebuild
-rw-r--r--.travis.yml43
-rw-r--r--Provision/FileSystem.php3
-rw-r--r--platform/backup.provision.inc28
3 files changed, 34 insertions, 40 deletions
diff --git a/.travis.yml b/.travis.yml
index 10029a8..061dbf3 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,10 +9,8 @@ branches:
env:
global:
- - DOCKER_VERSION=1.12.0-0~trusty
- - DOCKER_COMPOSE_VERSION=1.7.1
- - AEGIR_TESTS_VERSION
- - AEGIR_HOSTMASTER_VERSION=7.x-3.x
+ - AEGIR_HOSTING_VERSION=7.x-3.x
+ - AEGIR_TESTS_VERSION=master
#env:
# - test: Ubuntu 14.04 Apache
@@ -23,48 +21,29 @@ env:
addons:
hosts:
- - aegir.travis
- - sitetest.aegir.travis
+ - aegir.local.computer
+ - sitetest.aegir.local.computer
services:
- docker
-before_install:
- # Show travis build dir variable.
- - echo $TRAVIS_BUILD_DIR
- - dpkg -l docker\*
- # Get Hostmaster
- - git clone http://git.drupal.org/project/hostmaster.git /home/travis/build/aegir-project/hostmaster
- - cd /home/travis/build/aegir-project/hostmaster
- - git checkout $AEGIR_HOSTMASTER_VERSION
+before_install:
# Get test scripts
- git clone http://github.com/aegir-project/tests.git /home/travis/build/aegir-project/tests
- cd /home/travis/build/aegir-project/tests
+ - git checkout $AEGIR_TESTS_VERSION
- # list docker-engine versions
- - apt-cache madison docker-engine
-
- # upgrade docker-engine to specific version
- - sudo apt-get -o Dpkg::Options::="--force-confnew" install -y docker-engine=${DOCKER_VERSION}
-
- # reinstall docker-compose at specific version
- - sudo rm /usr/local/bin/docker-compose
- - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- - chmod +x docker-compose
- - sudo mv docker-compose /usr/local/bin
- - docker --version
- - docker-compose --version
+ # Run docker prepare script.
+ - cd /home/travis/build/aegir-project/tests/travis
+ - sudo bash prepare-docker.sh
# Get aegir/hostmaster and database images.
- - sudo docker pull aegir/hostmaster
+ - sudo docker pull aegir/hostmaster:local
- sudo docker pull mariadb
script:
# Tests are included in the docker-compose.yml file in the tests repo.
- # See https://github.com/aegir-project/tests/blob/master/travis/docker-compose.yml for the docker setup.
- # See https://github.com/aegir-project/dockerfiles/blob/master/docker-entrypoint-tests.sh for the script that runs the tests.
- # See https://github.com/aegir-project/tests for the behat tests.
- - sudo docker-compose run hostmaster --rm
+ - sudo docker-compose -f docker-compose-provision.yml run hostmaster --rm
diff --git a/Provision/FileSystem.php b/Provision/FileSystem.php
index dfe7ad6..6fe36dc 100644
--- a/Provision/FileSystem.php
+++ b/Provision/FileSystem.php
@@ -300,6 +300,9 @@ class Provision_FileSystem extends Provision_ChainedState {
// same here: some do not support -z
$command = 'gunzip -c %s | tar pxf -';
}
+ elseif (substr($path, -2) == 'bz2') {
+ $command = 'bunzip -c %s | tar pxf -';
+ }
else {
$command = 'tar -pxf %s';
}
diff --git a/platform/backup.provision.inc b/platform/backup.provision.inc
index c7b2425..3ac5999 100644
--- a/platform/backup.provision.inc
+++ b/platform/backup.provision.inc
@@ -36,20 +36,29 @@ function drush_provision_drupal_provision_backup_validate($backup_file = NULL) {
}
if (!$backup_file) {
- $suggested = d()->platform->server->backup_path . '/' . d()->uri . '-' . date("Ymd.His", time()) . '.tar.gz';
-
- // Use format of mysite.com-2008-01-02, if already existing, add number.
- $count = 0;
- while (is_file($suggested)) {
- $count++;
- $suggested = d()->platform->server->backup_path . '/' . d()->uri . '-' . date('Ymd.His', time()) . '_' . $count . '.tar.gz';
- }
+ $suggested = drush_provision_drupal_provision_backup_suggest_filename();
drush_set_option('backup_file', $suggested);
}
}
/**
+ * Util function to suggest a filename for a new site backup.
+ */
+function drush_provision_drupal_provision_backup_suggest_filename() {
+ $suffix = drush_get_option('provision_backup_suffix', '.tar.gz');
+ $suggested = d()->platform->server->backup_path . '/' . d()->uri . '-' . date("Ymd.His", time()) . $suffix;
+
+ // Use format of mysite.com-2008-01-02, if already existing, add number.
+ $count = 0;
+ while (is_file($suggested)) {
+ $count++;
+ $suggested = d()->platform->server->backup_path . '/' . d()->uri . '-' . date('Ymd.His', time()) . '_' . $count . $suffix;
+ }
+ return $suggested;
+}
+
+/**
* Implentation of hook_provision_backup()
*/
function drush_provision_drupal_provision_backup() {
@@ -84,6 +93,9 @@ function drush_provision_drupal_provision_backup() {
}
if (substr($backup_file, -2) == 'gz') {
$command = 'tar cpfz %s .';
+ }
+ elseif (substr($backup_file, -3) == 'bz2') {
+ $command = 'tar cpfj %s .';
} else {
$command = 'tar cpf %s .';
}