|
|
@ -2,7 +2,7 @@ image: php
|
|
|
|
|
|
|
|
|
|
|
|
cache:
|
|
|
|
cache:
|
|
|
|
paths:
|
|
|
|
paths:
|
|
|
|
- .composer
|
|
|
|
- .composer
|
|
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
services:
|
|
|
|
- mariadb:10.2
|
|
|
|
- mariadb:10.2
|
|
|
@ -37,7 +37,16 @@ before_script:
|
|
|
|
# Install Composer
|
|
|
|
# Install Composer
|
|
|
|
- &before_install_composer |-
|
|
|
|
- &before_install_composer |-
|
|
|
|
curl -sS https://getcomposer.org/installer | php -- --no-ansi --install-dir /usr/local/bin/ --filename composer
|
|
|
|
curl -sS https://getcomposer.org/installer | php -- --no-ansi --install-dir /usr/local/bin/ --filename composer
|
|
|
|
/usr/local/bin/composer --no-ansi install
|
|
|
|
composer --no-ansi install
|
|
|
|
|
|
|
|
# Install Node.js and Yarn
|
|
|
|
|
|
|
|
- &before_install_yarn |-
|
|
|
|
|
|
|
|
apt -yqq install gnupg2 apt-transport-https
|
|
|
|
|
|
|
|
curl -sL https://deb.nodesource.com/setup_8.x | bash -
|
|
|
|
|
|
|
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
|
|
|
|
|
|
|
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
|
|
|
|
|
|
|
|
apt -yqq update && apt -yqq install nodejs yarn
|
|
|
|
|
|
|
|
yarn install
|
|
|
|
|
|
|
|
yarn build
|
|
|
|
|
|
|
|
|
|
|
|
.test_template: &test_definition
|
|
|
|
.test_template: &test_definition
|
|
|
|
stage: test
|
|
|
|
stage: test
|
|
|
@ -61,11 +70,12 @@ test:7.1:
|
|
|
|
services: []
|
|
|
|
services: []
|
|
|
|
stage: deploy
|
|
|
|
stage: deploy
|
|
|
|
only:
|
|
|
|
only:
|
|
|
|
- master
|
|
|
|
- master
|
|
|
|
before_script:
|
|
|
|
before_script:
|
|
|
|
- *before_fix_permissions
|
|
|
|
- *before_fix_permissions
|
|
|
|
- *before_install_packages
|
|
|
|
- *before_install_packages
|
|
|
|
- *before_install_composer
|
|
|
|
- *before_install_composer
|
|
|
|
|
|
|
|
- *before_install_yarn
|
|
|
|
|
|
|
|
|
|
|
|
.deploy_template_script:
|
|
|
|
.deploy_template_script:
|
|
|
|
# Configure SSH
|
|
|
|
# Configure SSH
|
|
|
@ -78,8 +88,8 @@ test:7.1:
|
|
|
|
- &deployment_dependencies |-
|
|
|
|
- &deployment_dependencies |-
|
|
|
|
chmod +x ./deploy.sh
|
|
|
|
chmod +x ./deploy.sh
|
|
|
|
apt update && apt install -yqq rsync openssh-client
|
|
|
|
apt update && apt install -yqq rsync openssh-client
|
|
|
|
/usr/local/bin/composer --no-ansi install --no-dev
|
|
|
|
composer --no-ansi install --no-dev
|
|
|
|
/usr/local/bin/composer --no-ansi dump-autoload --optimize
|
|
|
|
composer --no-ansi dump-autoload --optimize
|
|
|
|
|
|
|
|
|
|
|
|
deploy_staging:
|
|
|
|
deploy_staging:
|
|
|
|
<<: *deploy_definition
|
|
|
|
<<: *deploy_definition
|
|
|
|