-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
110 lines (94 loc) · 5.42 KB
/
.travis.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
language: php
php:
- 7.2
dist: xenial
addons:
apt:
sources:
- sourceline: ppa:ondrej/php
packages:
- libsodium-dev
- libyaml-dev
env:
global:
- DOCKER_REPO=letsflow
- STAGING_AWS_ACCESS_KEY_ID=AKIAIWFAXQWNDAHESRAA
- PRODUCTION_AWS_ACCESS_KEY_ID=AKIAJQQQ7NJVV6B67VCA
- STAGING_DOCKER_ECR=930677074220.dkr.ecr.eu-west-1.amazonaws.com
- PRODUCTION_DOCKER_ECR=044051773080.dkr.ecr.eu-west-1.amazonaws.com
- secure: "xUSNAIFubACskCTzvOqjmpRA8Nq+aPJ5s1D8ou+kXvpCH79w8YuZOeaUtFC5mTKS9aW0yGVJoOpbPp/cUgpTMrQ7gFBILZqE3QOnDtXYSwynE3BHjg9joDqCRtO7DmTVzrx8JqqVixzVYKeN18YdzBe1DWutRdqu+B84boo3KFhGr2YRFKzEmcG4dqcPKP+uppn0GyeDzZ81JqSi3XSnaNEb687ZwZy3GTGJAvECA1P/HyYloxbyxuPDH8XO0mzfWBGZhZTCu2nqZ5DFf/JZxA8SUWZMSblq4uDwqPuHe7w1KY1ZrjG5SI+QUueqb2W/oh5gPP9ZxJAwzWDm9A9nm0rnHAuobveHUOKy8lmYqps9jbs3xi6i8Vwb7VnKCsYExOgM30g7i/71bms5kWatmWBNHsjDpGo2lKhtuTlJfVp9GJtiMO2lyrjzlyiSh0wZkQ/lMUgv7SX34jI+3vM2XJ3NEypXEH8A+DYdF45GsahbTSENPsT925tUWbXB6kLtrui5PQcqgVBPDNvZKiPKHl9XxPWpaPkLFsE8dFMhPv5mWYF1C6ZPE9QxraWJgRqn1EjsxaChuHMoqivkEAQGza5bO1spUePMqtPdpU9Kwv6t9XA7ikseI4zmBN7Gwc8Eddt7DVd7eGR1F8YUpHfxCaV/wvO8hzW6BdF4hurbaQc="
- secure: "mIHJ+4f229svMzwJZmBS3s/BrQDs1qtDWVilvZPEbi3PCAABiLnV8REXKaVH157gq6/mmNb2nbMKb2bN1gRM/Dj+aCRklfKN3L/fe15TH4we3J3GDN1Crvk9KtmbvrfNDI+mK8F030i3KZLNo0EgCdiEfc0vPQHb2xfo7jVEzMZA2pDKcwoBRou8ycc45S8AwtRjaf4k3cSvRApNlSXmKdMJRxJuCdUPIjzZKQsDF71/osSoFd13reQygWFlH1GD33ORUCN7wUjhywEStCO4id0KycF2ICpQ/6pPBESYQw9zqFtyVoyazE7XFIQSZ/foqo3xdf0XGpbt5ZhsrUfAf45C6QcOhQePyZgsk0XpmKVdOSmhuhTAXxn9nQRvTUpRTryqAD0GwZLO1Mu7w6KTjpLS3eXYX+kTb5b2C7I1eBZQ/0rV6mw1F4fse6EN5c1m0m4atgTcHGneKcw1FbnLVC8gkvMvlg3FJVFCnPDih44L5SK1JFeVeWviVMA1K9fqsFrkIA5lTFn4EoLeaJsX0AvxJEAy9Rjq/MooOCMd8omqr5FzyAwS1C4r4h5BOOWDmJqDksJ1o69VjifF4ciJ/TeybSEThhIOIKG1fltKYidaufFyr1Q1DZpMUVeuZCvVox/b297soAqq4W1uz99/1zgFTxMrDhTJnKbvx8czCJY="
services: mongodb
# Add your branch here to have it tested
branches:
only:
- master
- /^v\d+\.\d+\.\d+$/
before_install:
# Configure Git
- git config --global user.email "[email protected]"
- git config --global user.name "Travis CI"
# Install required PHP extension
- pecl install --soft libsodium
- echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo | pecl install --soft yaml
# Get all tags of git repo
- git fetch origin 'refs/tags/*:refs/tags/*'
install:
- composer install
- wget https://scrutinizer-ci.com/ocular.phar -O "$HOME/ocular.phar"
before_script:
- php bin/codecept build
script:
- php bin/codecept run --coverage --coverage-xml
after_success:
# Bump version
- npm install mversion -g
- pip install --user awscli
- test "$TRAVIS_BRANCH" != 'master' -o "$TRAVIS_PULL_REQUEST" != "false" || test -n "$(git tag --contains)" || bin/bump-version
- test "$TRAVIS_BRANCH" != 'master' -o "$TRAVIS_PULL_REQUEST" != "false" || docker build -t $DOCKER_REPO .
before_deploy:
# Set environment variables for Elastic Beanstalk deploy
- export ELASTIC_BEANSTALK_ENV="letsflow-${TRAVIS_BRANCH}"
- export ELASTIC_BEANSTALK_LABEL=$(git tag --contains)
- export TAG=$(git tag --contains)
- test -n "$ELASTIC_BEANSTALK_LABEL" || export ELASTIC_BEANSTALK_LABEL="${TRAVIS_BRANCH}-${TRAVIS_COMMIT:0:7}"
deploy:
# Staging
# Deploy docker image to ECR
- provider: script
script: bin/deploy-staging
skip_cleanup: true
on:
branch: master
- provider: elasticbeanstalk
access_key_id: AKIAIWFAXQWNDAHESRAA
secret_access_key:
secure: "eTW1yCDYSEIeT/GSbRDEWTpc0qLNyo/J/5dkLjzEgqc+1LXSzW17TT+ja8PwhDu6v60H4ngFdFqX1URvZaMp+OkzRUYu9jfYTzF6lvA74n10ugOQM+oAYdw6cGpsnsAgZjTYyYZy5+k3HxOsacQQUR6zuoD7s+odipOixMipxOHH/mbLBl0m4so5qhWeK98Q8p3EXdHP6X+ARVn+87xPPI71wmGJ2Mph/8VrjV733R5azRLKG5CBxaOgkrnVKRzRZCF9bMkjPrVQ+o7seVWNZDGewYrbdAHhcquZB2AAjzpOpNaDxx1e/wypJ2vzOrDnzlxjKeBbeME2BqHCpWbL6IA2nuXyEUcGnC8r20WbvUYSZGZ9qiRTqli9N+7hK13XH6p0RaH8nzYhT5CKIaxi3TY2VEDgWywS6LWLz/uhBfLX1zMASsN/ekEY8i2Gd/yLjx40WxoCNkmp5pxQz3gjrZmlHp25SHYwQsuEGUwWf10ny6+Jbciz63Gzp0srYMCU0R8/FY2w6ohz6SSCKjWiV/s+FBGVuS2h6ewPntrK+j+s7D4cuyTSQGbCkGDE15rntCwcZeoNKSqRt228sUR2bO7gWVEOzSjF0NNMrmegNSf3BUrB3c2D0IibQbAMdfc3sOh+c8v0r7qcOyMpepzJKpSaK3YfLOhiu0Be7tRD2t8="
region: eu-west-1
app: letsflow
zip_file: app.zip
bucket_name: elasticbeanstalk-eu-west-1-930677074220
skip_cleanup: true
bucket_path: letsflow
on:
branch: master
# Production deploy image
- provider: script
script: bin/deploy-production
skip_cleanup: true
on:
branch: master
- provider: elasticbeanstalk
access_key_id: AKIAJQQQ7NJVV6B67VCA
secret_access_key:
secure: "JEE3Y4HHozfxtJ/duDrSEwSHCrWU2KPVeFs10BTRKHuG9Bt2tzdDhwKwHpqNk4aJO4E9RO1VFfi1L0i5f+WMP7ApMbXNDdgqkHdD8Vpg/CMw97K8r7WW26k7Xd8XrJ4nS6CSH/Ats7ESUXx6Nunc0AJBUK4IsDFCi/eVAurcorkzSBqCtSFqX910uXb/Jv5u6B8jKt//phmGHpHWjUc1wNZH6NHuegUxv1cqdLVlhx5P10rWCU+2pVDGnTgxiG1aYLQBgOsMqUmWglLNdmMzIc4tL292fjj1lFujefEE50UZx+ypylPv/tr2JbsDeA/jPQjtwV3qRmNKCrMtB1fRjnWUTOD1C3z3VcX/DAIchybMhbecFubkVkaqFm6cBx/gNmm5z2BOj9RurpoYRSyXeJYrisnVhl8dNqpgKqQ28phbn/uojynVy2X0BaAVWbuWyI/HuSGIBCevCni1ZZURXwcAo3KU2qwioKETYHBVQXrEiyj1Xnzh6/gYJsrlxMW6sZNUCyBEjhIlUZCzECfIKXUY76iPEABnlkj0q4DMiKfdfqe5Q7UcA5NFmFq2k1x+2LtuU/zqg+L3E0dgErJRmtS6/SfCiY1NVolf0Ei4UIxfIYjY59vHythXCr4gv9Me5HY4DYsGqNs4fY53c0EuwZv6uT9EPWJU2bNv12rXdJ0="
region: eu-west-1
app: letsflow
zip_file: app.zip
bucket_name: elasticbeanstalk-eu-west-1-044051773080
skip_cleanup: true
bucket_path: letsflow
only_create_app_version: true
on:
branch: master