.gitlab-ci.yml 2.13 KB
Newer Older
1 2 3 4 5
include:
  - project: 't3o/t3olayout'
    ref: master
    file: '/Configuration/GitLab/t3o-builds.yml'

Thomas Löffler's avatar
Thomas Löffler committed
6

7
variables:
8 9 10 11
  GIT_STRATEGY: "none"
  GIT_SSL_NO_VERIFY: "true"
  STAGE_PORT: 22200
  STAGE_HOST: "extensions-stage-v9.typo3.org"
12
  PRODUCTION_PORT: 22201
13
  PRODUCTION_HOST: "extensions.typo3.org"
14
  DUMP_USER: "extensions"
15 16
  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"
17

18
test:unit:
19
  stage: test
20
  image: composer:1
21
  variables:
Thomas Löffler's avatar
Thomas Löffler committed
22 23
    GIT_STRATEGY: "clone"
    GIT_SUBMODULE_STRATEGY: "recursive"
24
  before_script:
Thomas Löffler's avatar
Thomas Löffler committed
25
    - apk add git --update
26
    - export TYPO3_PATH_WEB="$PWD/private"
27
    - composer config cache-dir /cache/composer
Thomas Löffler's avatar
Thomas Löffler committed
28
    - mkdir $TYPO3_PATH_WEB/fileadmin/ && touch $TYPO3_PATH_WEB/fileadmin/currentcoredata.json
29
  script:
30
    - composer install --ignore-platform-reqs
Thomas Löffler's avatar
Thomas Löffler committed
31
    - composer test:unit
32

33 34 35

.deploy-template: &deploy_template
  stage: deploy
Thomas Löffler's avatar
Thomas Löffler committed
36
  image: composer:1
37
  before_script:
38
    - apk add rsync --update
39 40 41 42 43 44
    - mkdir -p /root/.ssh/
    - 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 -p ${PRODUCTION_PORT} ${PRODUCTION_HOST} >> /root/.ssh/known_hosts
Thomas Löffler's avatar
Thomas Löffler committed
45 46 47
    - composer config cache-dir /cache/composer
    - composer global require deployer/deployer
    - composer global require deployer/recipes
48
  script:
49
    - /tmp/vendor/bin/dep --file=./.gitlab-ci/deployer/deploy.php deploy ${CI_BUILD_REF_NAME}
50 51 52 53 54
  dependencies:
    - layout
  except:
    - assets