...
 
Commits (2)
cache:
key: "$CI_COMMIT_REF_NAME-$CI_JOB_STAGE"
paths:
- /composer
include: 'https://git-t3o.typo3.org/t3o/t3olayout/raw/develop/Configuration/GitLab/t3o-builds.yml'
variables:
GIT_STRATEGY: "none"
GIT_SSL_NO_VERIFY: "true"
before_script:
- apk add bash --no-cache
stages:
- dump
- test
- build
- layout
- deploy
GIT_STRATEGY: "none"
GIT_SSL_NO_VERIFY: "true"
STAGE_PORT: 22191
STAGE_HOST: "extensions-stage.typo3.org"
PRODUCTION_PORT: 22192
PRODUCTION_HOST: "extensions.typo3.org"
DUMP_USER: "extensionsstage"
test:unit:
stage: test
......@@ -33,106 +25,3 @@ test:unit:
- mkdir $TYPO3_PATH_WEB/fileadmin/ && touch $TYPO3_PATH_WEB/fileadmin/currentcoredata.json
script:
- ./composer.phar test:unit
test:php:
stage: test
image: ekreative/php-cs-fixer:2
variables:
GIT_STRATEGY: "clone"
script:
- php-cs-fixer fix --dry-run --config=.gitlab-ci/build/.php_cs --diff
except:
- assets
build:
stage: build
image: php:7.0-alpine
variables:
GIT_STRATEGY: "clone"
GIT_SUBMODULE_STRATEGY: "recursive"
before_script:
- apk add bash --no-cache
- apk add git --update
- curl https://getcomposer.org/composer.phar -o composer.phar --silent
- chmod +x composer.phar
script:
- ./composer.phar config store-auths false
- ./composer.phar config http-basic.git-t3o.typo3.org gitlab-ci-token ${CI_BUILD_TOKEN}
- ./composer.phar install --no-interaction --no-progress --no-dev
- rm composer.phar
artifacts:
paths:
- ./
expire_in: '1h'
except:
- assets
layout:
stage: layout
image: node:latest
before_script:
- cd html/typo3conf/ext/t3olayout/Build
script:
- npm install
- npm run build
artifacts:
paths:
- ./
expire_in: '7d'
dependencies:
- build
except:
- assets
.deploy-template: &deploy_template
stage: deploy
image:
name: "torvitas/deployer:4.0.0-alpine"
entrypoint: [""]
before_script:
- 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 22191 extensions-stage.typo3.org >> /root/.ssh/known_hosts
- ssh-keyscan -p 22192 extensions.typo3.org >> /root/.ssh/known_hosts
script:
- dep -f./.gitlab-ci/deployer/deploy.php deploy ${CI_BUILD_REF_NAME}
dependencies:
- layout
except:
- assets
deploy-master:
<<: *deploy_template
environment:
name: master
url: https://extensions.typo3.org/
only:
- master
deploy-develop:
<<: *deploy_template
environment:
name: develop
url: https://extensions-stage.typo3.org/
only:
- develop
dump-assets:
<<: *deploy_template
stage: dump
image: alpine:3.5
artifacts:
paths:
- ./assets/
expire_in: '3d'
script:
- apk add rsync --no-cache
- rsync -ah -e "ssh -p 22191" extensionsstage@extensions-stage.typo3.org:ci/shared/ ./assets/
- ssh -p22191 extensionsstage@extensions-stage.typo3.org "mysqldump -u${DEV_DATABASE_USER} -p${DEV_DATABASE_PASSWORD} -h127.0.0.1 extensionsstage | gzip -9 -c" > ./assets/db.sql.gz
dependencies:
when:
only:
- assets
except: