Commit 7a9a4fb2 authored by Thomas Löffler's avatar Thomas Löffler

Remove assets job and add maintenance, remove port for new stage server

parent cb9908c6
......@@ -12,7 +12,7 @@ before_script:
- apk add bash --no-cache
stages:
- dump
- maintenance
- test
- build
- layout
......@@ -28,8 +28,6 @@ test:typoscript:
script:
- /tmp/vendor/bin/typoscript-lint -c typoscript-lint.yml --fail-on-warnings
allow_failure: true
except:
- assets
test:php:
stage: test
......@@ -38,8 +36,6 @@ test:php:
GIT_STRATEGY: "clone"
script:
- php-cs-fixer fix --dry-run --config=.gitlab-ci/build/.php_cs --diff
except:
- assets
build:
stage: build
......@@ -61,8 +57,6 @@ build:
paths:
- ./
expire_in: '1h'
except:
- assets
layout:
......@@ -73,14 +67,14 @@ layout:
script:
- npm install
- npm run build
after_script:
- rm -Rf private/typo3conf/ext/t3olayout/Build/node_modules
artifacts:
paths:
- ./
expire_in: '4h'
dependencies:
- build
except:
- assets
.deploy-template: &deploy_template
stage: deploy
......@@ -91,7 +85,7 @@ layout:
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY_STAGE" | ssh-add -
- echo "$SSH_PRIVATE_KEY_PRODUCTION" | ssh-add -
- ssh-keyscan -p ${STAGE_PORT} ${STAGE_HOST} >> /root/.ssh/known_hosts
- ssh-keyscan ${STAGE_HOST} >> /root/.ssh/known_hosts
- ssh-keyscan -p ${PRODUCTION_PORT} ${PRODUCTION_HOST} >> /root/.ssh/known_hosts
- composer config cache-dir /cache/composer
- composer global require deployer/deployer:6.6.0 --update-with-dependencies
......@@ -119,29 +113,28 @@ deploy-develop:
only:
- develop
dump-assets:
stage: dump
image: ubuntu:18.04
.maintenance: &maintenance_template
variables:
LANG: de_DE.UTF-8
GIT_STRATEGY: none
stage: maintenance
when: manual
image:
name: composer:1
entrypoint: ["/bin/sh", "-c"]
before_script:
- apt-get update
- apt-get install -y rsync openssh-client php7.2-mysql
- mkdir -p /root/.ssh/
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY_STAGE" | ssh-add -
- ssh-keyscan -p ${STAGE_PORT} ${STAGE_HOST} >> /root/.ssh/known_hosts
- locale
- 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 ./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:
- ./assets/
expire_in: '1d'
script:
- mkdir -p ./assets/private/fileadmin/
- rsync -ah -e "ssh -p ${STAGE_PORT}" --exclude=_processed_ ${DUMP_USER}@${STAGE_HOST}:ci/shared/private/fileadmin/ ./assets/private/fileadmin/ --delete
- ssh -p${STAGE_PORT} ${DUMP_USER}@${STAGE_HOST} "${PHP_EXECUTABLE} ./ci/current/vendor/bin/typo3cms database:export --exclude-tables ${DUMP_EXCLUDE_TABLES_LIST} | gzip -9 -c" > ./assets/db.sql.gz
dependencies:
when:
only:
- assets
except:
- ./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