forked from HaxeFoundation/haxe.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
41 lines (40 loc) · 1.21 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
language: haxe
haxe: "3.2.1"
dist: trusty
sudo: required
services:
- docker
install:
- sudo apt-get update
- sudo apt-get -o Dpkg::Options::=--force-confnew install docker-engine -y
- docker --version
# https://docs.travis-ci.com/user/docker/#Using-Docker-Compose
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/1.7.1/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
# build and run the docker image
- docker-compose up -d
- count=1; until [ $count -gt 10 ] || ( curl -s http://localhost/ > /dev/null && [ $( curl -s http://localhost/ | grep Error | wc -l ) = 0 ] ); do
echo "try again";
let count+=1;
sleep 5;
done
- curl http://localhost/update/site/
- curl http://localhost/update/manual/
script:
- curl http://localhost/
deploy:
provider: elasticbeanstalk
access_key_id: $AWS_ACCESS_KEY
secret_access_key: $AWS_SECRET_KEY
region: $AWS_REGION
app: $EB_APP
env: ${TRAVIS_BRANCH}-haxe-org
bucket_name: $EB_BUCKET
on:
all_branches: true
condition: $TRAVIS_BRANCH = master || $TRAVIS_BRANCH = staging
cache:
directories:
- deploy