-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
48 lines (39 loc) · 1.41 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
language: php
sudo: true
php:
- 5.3
- 5.4
- 7.0
before_install:
- echo "extension = ldap.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- sudo apt-get install php5-ldap
install:
- curl -s http://getcomposer.org/installer | php
- php composer.phar install --dev --no-interaction
- pip install --user awscli # install aws cli w/o sudo
before_script:
- sh -c "composer require 'cakephp/cakephp-codesniffer:dev-master'"
- phpenv rehash
script:
- mkdir -p build/logs
- php vendor/bin/phpunit -c phpunit.xml.dist
- sh -c "vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests ./config ./webroot"
- bin/atoum --test-all
after_success:
- travis_retry php vendor/bin/coveralls
- travis_retry php vendor/bin/coveralls -v
deploy:
# deploy master to production
- provider: script
script:
- export PATH=$PATH:$HOME/.local/bin # put aws in the path
- eval $(aws ecr get-login) #needs AWS_ACCESS_KEY_ID, aws_default_region, and AWS_SECRET_ACCESS_KEY envvars
- docker build -t makermanager .
- docker tag makermanager:latest $ECR_ACCOUNT.dkr.ecr.us-east-1.amazonaws.com/makermanager:build-$TRAVIS_BUILD_NUMBER
- docker push $ECR_ACCOUNT.dkr.ecr.us-east-1.amazonaws.com/makermanager:build-$TRAVIS_BUILD_NUMBER
on:
branch: master
notifications:
email:
on_success: never
on_failure: always