mglaman / contribkanban.com

ContribKanban.com - turning Drupal.org issue queues into kanban boards to better Drupalkind
http://contribkanban.com/
GNU General Public License v2.0
62 stars 23 forks source link

post-rollout for installing sample database deleted production database #379

Closed mglaman closed 2 years ago

mglaman commented 2 years ago

The following post-rollout hook deleted the database in production somehow, on one single deployment. No others after

  - run:
      command: |
        if [[ -n ${LAGOON_PR_BASE_BRANCH} ]] && ! drush status --fields=bootstrap | grep -q "Successful"; then
            ./bin/drush -y site-install --account-pass=admin
        fi
      name: If this is a pull request, install the database.
      service: cli
mglaman commented 2 years ago

The new updated docs from https://docs.lagoon.sh/using-lagoon-advanced/workflows/:

        name: IF no Drupal installed & Pullrequest = Sync database from staging
        command: |
            if [[ -n ${LAGOON_PR_BASE_BRANCH} ]] && tables=$(drush sqlq 'show tables;') && [ -z "$tables" ]; then
                drush -y sql-sync @staging default
            fi