Skip to content
Snippets Groups Projects
Commit cf9ce1a6 authored by jurgenhaas's avatar jurgenhaas
Browse files

Allow replacing "drush -y updatedb" with a custom command using UPDATE_DB_COMMAND

parent 86d8d009
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,7 @@ variables:
THEME_BUILD_COMMAND: './node_modules/gulp/bin/gulp.js sass'
THEME_BUILD_NODE_IMG: 'registry.lakedrops.com/docker/node:12-stretch-slim'
THEME_CSS_PATH: web/core/themes/olivero/css
UPDATE_DB_COMMAND: 'drush -y updatedb'
include:
- project: 'gitlab-ci-cd/drupal'
......
......@@ -129,11 +129,11 @@ Debug:
GIT_STRATEGY: none
script:
- docker cp ${PROJECT_NAME}.sql ${COMPOSE_PROJECT_NAME}-php-1:/var/www/html
- drush sql:drop --yes
- drush -y sql:drop
- drush sql:query --file=../${PROJECT_NAME}.sql
- drush cr
- if [[ "${SKIPCONFIGIMPORT}" == "no" ]]; then drush -y config-import; fi
- drush updatedb
- ${UPDATE_DB_COMMAND}
- drush cr
.prerequisites:
......@@ -490,8 +490,8 @@ Debug:
GIT_STRATEGY: none
script:
- drush cr
- if [[ "${SKIPCONFIGIMPORT}" == "no" ]]; then drush config-import; fi
- drush updatedb
- if [[ "${SKIPCONFIGIMPORT}" == "no" ]]; then drush -y config-import; fi
- ${UPDATE_DB_COMMAND}
- drush cr
rules:
- if: '$DBREQUIRED == "yes"'
......@@ -613,7 +613,7 @@ Debug:
- if [[ -f ./crontabs/jobs.ini ]]; then docker compose exec -u root php chown -R www-data:www-data /var/backups/mysql || true; fi
- if [[ "$INITIAL" == "no" ]]; then sleep 3; drush -y cache-rebuild; fi
- if [[ "$INITIAL" == "no" ]] && [[ "${SKIPCONFIGIMPORT}" == "no" ]]; then drush -y config-import; fi
- if [[ "$INITIAL" == "no" ]]; then drush -y updatedb; fi
- if [[ "$INITIAL" == "no" ]]; then ${UPDATE_DB_COMMAND}; fi
- if [[ "$INITIAL" == "no" ]]; then drush -y php:eval "node_access_rebuild();"; fi
- if [[ "$INITIAL" == "no" ]]; then drush -y deploy:hook; fi
- if [[ "$INITIAL" == "no" ]]; then drush -y sset system.maintenance_mode 0; fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment