-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
executable file
·39 lines (35 loc) · 1.16 KB
/
.gitlab-ci.yml
File metadata and controls
executable file
·39 lines (35 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Select image from https://hub.docker.com/iamapinan/php-nginx-mongo
image: iamapinan/php-nginx-mongo:1.3
stages:
- deploy
# - test
cache:
untracked: true
# test:
# stage: test
# only:
# - master
# before_script:
# - apt-get update -yqq
# - 'which git || ( apt-get install git -y )'
# - 'which unzip || (apt-get install zip unzip zlib1g-dev -y)'
# - docker-php-ext-install pdo_mysql
# - docker-php-ext-install zip
# script:
# - curl -sS https://getcomposer.org/installer | php
# - composer install
# - vendor/bin/phpunit --configuration phpunit.xml --colors=auto
deploy:
stage: deploy
only:
- master
before_script:
- apk update
- apk add rsync openssh
- mkdir -p ~/.ssh
- eval $(ssh-agent -s)
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
script:
- ssh-add <(echo "$SSH_PRIV_KEY")
- rsync -azP --exclude .git --exclude composer.lock --exclude composer.phar . iotech@$DEPLOY_HOST_B:/mnt/data/modeeducation.com/app
# - ssh iotech@$DEPLOY_HOST_B "cd /mnt/data/modeeducation.com/app && composer install && composer dumpautoload && php artisan migrate"