From 9a4819294e2c2b7cf6de9740b1cd0a1bbcfd719b Mon Sep 17 00:00:00 2001 From: Bec White Date: Mon, 12 Dec 2016 12:51:07 -0600 Subject: [PATCH 1/3] Add a 'load-db' target. --- tasks/lib/db.xml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tasks/lib/db.xml diff --git a/tasks/lib/db.xml b/tasks/lib/db.xml new file mode 100644 index 00000000..fba9482f --- /dev/null +++ b/tasks/lib/db.xml @@ -0,0 +1,39 @@ + + + + + Hello world. + + + + + + + + + + + + + + Missing database export at '${db.load.export_prefix}.sql.gz' + +Please download a database export to: + ${db.load.export_prefix}*.sql.gz + +Alternatively, you can specify the export file prefix; for example: + vendor/bin/phing [YOUR-TARGET] -Ddb.load.export_prefix=artifacts/prod-* + +Or, you can specify the export file directly: + vendor/bin/phing [YOUR-TARGET] -Ddb.load.file=artifacts/my_db.sql.gz + + + + + + Loading the `${db.load.file}` database... + + + + + From 7b7e52f4528ab60b9208533a25af80349fa18fdd Mon Sep 17 00:00:00 2001 From: Bec White Date: Wed, 18 Jan 2017 15:47:08 -0600 Subject: [PATCH 2/3] Change db dump filename pattern variable so that the wildcard is included. --- tasks/lib/db.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tasks/lib/db.xml b/tasks/lib/db.xml index fba9482f..1d29862e 100644 --- a/tasks/lib/db.xml +++ b/tasks/lib/db.xml @@ -6,23 +6,23 @@ - + - + - + - Missing database export at '${db.load.export_prefix}.sql.gz' + Missing database export at '${db.load.export_pattern}.sql.gz' Please download a database export to: - ${db.load.export_prefix}*.sql.gz + ${db.load.export_pattern}.sql.gz Alternatively, you can specify the export file prefix; for example: - vendor/bin/phing [YOUR-TARGET] -Ddb.load.export_prefix=artifacts/prod-* + vendor/bin/phing [YOUR-TARGET] -Ddb.load.export_pattern=artifacts/prod-* Or, you can specify the export file directly: vendor/bin/phing [YOUR-TARGET] -Ddb.load.file=artifacts/my_db.sql.gz From f0cfe270e1b72c6e6244692984e7407686542ec4 Mon Sep 17 00:00:00 2001 From: Bec White Date: Wed, 18 Jan 2017 15:47:39 -0600 Subject: [PATCH 3/3] Add property documentation for db loading. --- docs/properties.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/docs/properties.md b/docs/properties.md index 506b74e7..42443a02 100644 --- a/docs/properties.md +++ b/docs/properties.md @@ -77,3 +77,25 @@ Cool! This phing-ism is what powers our environment-specific property layering a | `acquia.dir` | `artifacts/acquia` | Relative path of where to keep the Acquia repository. | [More info](../tasks/acquia.xml#L32-L59) + +### DB Loading + +| Property | Default value | What is it? | +|---|---|---| +| `db.load.export_pattern` | `artifacts/*` | Pattern to match gzipped database dump files. | +| `db.load.mysql_command` | `drush sqlc` | Command with which to load stuff into Drupal. | +| `db.load.file` | | Load a specific file rather than one matching the `export_pattern`. | + +Example usage: + +``` + + + + + + + +``` + +[More info](../tasks/lib/db.xml)