Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
66 lines (63 sloc) 2.3 KB
version: 2.1
jobs:
migrate:
working_directory: /var/www/html
docker:
- image: juampynr/drupal8ci:latest
- image: quay.io/juampynr/drupal8_migrate:master
auth:
username: $QUAY_USERNAME
password: $QUAY_PASSWORD
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Configure environment
command: |
composer install
vendor/bin/robo docker:install-client
cp .circleci/config/settings.local.php web/sites/default/settings.local.php
- run:
name: Download and install the latest Drupal 7 database
command: |
php vendor/juampynr/dropbox-api/dropbox-download.php drupal7.sql drupal7.sql
vendor/bin/drush sql-drop --database=drupal7 --yes
vendor/bin/drush sql-cli --database=drupal7 < drupal7.sql
mv --force drupal7.sql scripts/database/dumps/
- run:
name: Replace the full database by the config database
command: |
mysqldump -h127.0.0.1 -uroot -proot drupal8_config > drupal8_config.sql
vendor/bin/drush sql-drop --yes
vendor/bin/drush sql-cli < drupal8_config.sql
- run:
name: Import configuration and run database updates
command: |
vendor/bin/drush --yes updatedb
vendor/bin/drush --yes config:import
vendor/bin/drush cache:rebuild
vendor/bin/drush sql-dump > scripts/database/dumps/drupal8_config.sql
- run:
name: Run content migration
command: |
vendor/bin/drush migrate:import -vvv --feedback=100 --execute-dependencies --tag=Content
- run:
name: Dump the resulting database, build a Docker image, and push it to Quay.io
command: |
vendor/bin/drush sql-dump > scripts/database/dumps/drupal8.sql
docker login -u="$QUAY_USERNAME" -p="$QUAY_PASSWORD" quay.io
vendor/bin/robo database:build-image ${CIRCLE_BRANCH}
vendor/bin/robo database:push-image ${CIRCLE_BRANCH}
workflows:
version: 2
migration:
triggers:
- schedule:
cron: "0 0 * * *"
filters:
branches:
only:
- master
jobs:
- migrate
You can’t perform that action at this time.