Commit a7d2bc78 authored by Thomas Löffler's avatar Thomas Löffler

Add maintenance stage for dumping assets

parent 89eb2889
Pipeline #8718 failed
......@@ -3,13 +3,46 @@ include:
ref: master
file: '/Configuration/GitLab/t3o-builds.yml'
stages:
- maintenance
- test
- build
- layout
- deploy
variables:
GIT_STRATEGY: "none"
GIT_SSL_NO_VERIFY: "true"
STAGE_PORT: 22200
STAGE_HOST: "stage-v9.typo3.org"
STAGE_HOST: "stage.typo3.org"
PRODUCTION_PORT: 22201
PRODUCTION_HOST: "typo3.org"
DUMP_USER: "tthreeorgstage"
DUMP_EXCLUDE_TABLES_LIST: "be_groups,be_sessions,be_users,cf_cache_hash,cf_cache_hash_tags,cf_cache_imagesizes,cf_cache_imagesizes_tags,cf_cache_news_category,cf_cache_news_category_tags,cf_cache_pages,cf_cache_pages_tags,cf_cache_pagesection,cf_cache_pagesection_tags,cf_cache_rootline,cf_cache_rootline_tags,cf_extbase_datamapfactory_datamap,cf_extbase_datamapfactory_datamap_tags,cf_extbase_object,cf_extbase_object_tags,cf_extbase_reflection,cf_extbase_reflection_tags,cf_tx_solr,cf_tx_solr_configuration,cf_tx_solr_configuration_tags,cf_tx_solr_tags,fe_groups,fe_sessions,fe_users,sys_domain,sys_log,tx_solr_cache,tx_solr_cache_tags"
PHP_EXECUTABLE: "/opt/php/php72/bin/php"
.maintenance: &maintenance_template
variables:
GIT_STRATEGY: none
stage: maintenance
when: manual
image:
name: composer:1
entrypoint: ["/bin/sh", "-c"]
before_script:
- apk add rsync --update
- mkdir -p /root/.ssh/
- eval $(ssh-agent -s)
- mkdir -p ~/.ssh
- echo "$SSH_PRIVATE_KEY_STAGE" | ssh-add -
- ssh-keyscan ${STAGE_HOST} >> /root/.ssh/known_hosts
Get dump for local environment:
<<: *maintenance_template
script:
- mkdir dump
- ssh ${STAGE_USER}@${STAGE_HOST} "{{PHP_EXECUTABLE}} ./ci/current/vendor/bin/typo3cms database:export -c Default -e 'cf_*' -e 'cache_*' -e '[bf]e_sessions' -e '[bf]e_users' -e 'sys_log' -e 'sys_history' -e 'tx_solr_*' -e 'tx_igldapssoauth_config' | gzip -9 -c" > ./dump/dump.sql.gz
artifacts:
paths:
- ./dump/
expire_in: 1d
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment