You are here

04-use-database-artifact.sh in Thunder 8.3

#!/usr/bin/env bash
#
# Download stored database dump from S3 and import it

# Download project artifact from S3
aws s3 cp "s3://thunder-builds/${DB_ARTIFACT_FILE_NAME}" "${DB_ARTIFACT_FILE}"

# Unzip to deployment file. Deployment file should be provided for other scripts to work properly.
gunzip < "${DB_ARTIFACT_FILE}" > "${DEPLOYMENT_DUMP_FILE}"

# Import database
cd "${TEST_DIR}/docroot"
drush -y sql-create
drush -y sql-cli < "${DEPLOYMENT_DUMP_FILE}"

File

scripts/travis/04-use-database-artifact.sh
View source
  1. #!/usr/bin/env bash
  2. #
  3. # Download stored database dump from S3 and import it
  4. # Download project artifact from S3
  5. aws s3 cp "s3://thunder-builds/${DB_ARTIFACT_FILE_NAME}" "${DB_ARTIFACT_FILE}"
  6. # Unzip to deployment file. Deployment file should be provided for other scripts to work properly.
  7. gunzip < "${DB_ARTIFACT_FILE}" > "${DEPLOYMENT_DUMP_FILE}"
  8. # Import database
  9. cd "${TEST_DIR}/docroot"
  10. drush -y sql-create
  11. drush -y sql-cli < "${DEPLOYMENT_DUMP_FILE}"