Commit 216047dc authored by Thomas Löffler's avatar Thomas Löffler

Try included yml file

parent f7199de2
Pipeline #5394 failed
include: 'https://git-t3o.typo3.org/t3o/gitlab-main-site/blob/master/.gitlab-ci.yml'
variables:
GIT_STRATEGY: "none"
GIT_SSL_NO_VERIFY: "true"
before_script:
- apk add bash --no-cache
stages:
- dump
- test
- build
- layout
- deploy
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
artifacts:
paths:
- ./
expire_in: '1h'
except:
- assets
layout:
stage: layout
image: node:8
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 my-stage.typo3.org >> /root/.ssh/known_hosts
- ssh-keyscan -p 22193 my.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://my.typo3.org/
only:
- master
deploy-develop:
<<: *deploy_template
environment:
name: develop
url: https://my-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" --exclude=typo3conf my@my-stage.typo3.org:ci/shared/ ./assets/
- ssh -p22191 my@my-stage.typo3.org "mysqldump -u${STAGE_DATABASE_USER} -p${STAGE_DATABASE_PASSWORD} -h127.0.0.1 ${STAGE_DATABASE_DB} | gzip -9 -c" > ./assets/db.sql.gz
dependencies:
when:
tags:
- proxy
only:
- assets
except:
STAGE_PORT: 22191
STAGE_HOST: "my-stage.typo3.org"
PRODUCTION_PORT: 22193
PRODUCTION_HOST: "my.typo3.org"
DUMP_USER: "my"
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