-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
56 lines (51 loc) · 3.92 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
sudo: required
services:
- docker
env:
global:
- COMPOSE_VERSION=1.11.2
- DOCKER_REPO=rikkeisoft/docker-for-php
- secure: Veb1gg9W0iJXy7OU8AwlgLE/w8V82mSU8IwMA1dNV+crWaWqHHZr7WwAph6l0aTdBO551NJc2qUOz2jd3L36wnyNAE5kJ3eI+4PBx5PFqA4vc/+x3XfvihqnV23DeARI1GiU6kbWj4OBHuQwwrHTDrH7zAfBLHNIoN1hjOexS1Prms0pskxS43Ez28t7Lvi3nbm0WGfJbeJYcUI1GonFi06oENG5lx35BRxRwQGGE9idpdrE/ZrqihodmPXOrf1/I1/OwZ7AN8xbuqkbcDLK/HBLP/cZ3fPFiNgZiM83uPIM4pz+3fOjs/tpS67sE+oaZ8sTGYVTZmqralA7KN6XWckZMhUANHp2LbtPFnpweTsEUg5EBKa6kXKxqp7PuqlD5CVuyyIRPfrY8vzjHWV6jmoS7+hDU1/mn4Jma1HfSb6zf2ieViWwxuFGjVPkBCBhDt0W/an9m8ODWaxPv5hGr2pcRp4wfs+38F5ete/rC/Z1NMwUT76D6LzHTdupC+/RJbz9uHymLw9QL2WxR1aRBnrWNWsSLWq5glwz6m0k4DbAmsSPJvgg2MYmyLuCrhLN3GdS6eeHWBOMXmJPmuE6YgIUjjBIg+IAqmE2YOjeluAGK0kmUo2B9aWsnJ3+LcAIQb/BduSc1IMIeDqCwQlE18YOXLvYHxdAIljfxgSwhr0= # DOCKER_USER
- secure: fkKAjtPBaLjo7AHoLO8bg3dfSEKh69BZ+KABIj7+GlOrvCDnQP0UUZvizaV+Sr4tvfM98k9EJ0zIuIQD02nVHQJAcj2x2KUC5ojtfcHNjSeyEMMQtKbFPdq/R3CKQlUyi/abjUm3MRPMdEjLWd7cWnQ8EJiG0ue6++Q3gys7j1hKzAmoBGDn00ZojzdMVecqMczsibmItNJdiTGUdAyjOOf7hbWmfjWLpkcYElgyop8z867zxbfEM5tdNWBnK1YywWuXWjBb1+1akbYME8Cf9BlqCYwWJzRRmZm7cFKOlXU27D6u9t7BMhKu2JmC2xK5O05hAeDqdiviJS/luLcUH9Y2C9Ak92aN37tZIhALWFvI1vJ86zqlP3/I2Tlcdvrppb5yDFvBUr8IObbPloUQID7vlaCIYPPI+w1jvQBwg8OM4+ew2rUwo3MmwuwOxIXUWJ+/r+951rEbGlWDZyG8yplnUomchrAChxArB9mN6W0+PXiEiYPVz2a6F8julaFh3FxOsWDkr5y/bkfsaGSVUcPkl83nwytTv5cMiG02YV8M3V+qLP3H0ySs3/X1jCzPg5bS4z43H5lDRT3nMKNdGRi/9oHwp9Qo0ByLtooAK+zcb4PJeHqScXOhb1st6Gn+niWEvIK0+q1MP/aPNsTvCSCqvdJpn4tXSEjjhwdNLWs= # DOCKER_PASSWORD
before_install:
- sudo apt-get remove docker docker-engine
- sudo apt-get update
- sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common linux-image-extra-$(uname -r) linux-image-extra-virtual
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install docker-ce
- docker -v
- sudo rm /usr/local/bin/docker-compose
- sudo curl -L https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- docker-compose -v
- eval `ssh-agent -s`
script:
- docker-compose up -d --build
- docker-compose ps
# change permission for writable directories
- docker exec -it dockerforphp_php7_1 /usr/local/bin/fix_permission /app/storage
# Your test scripts
- curl --fail -F "image=@`pwd`/.travis.yml" http://127.0.0.1:8080
after_success:
- docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
- if [[ ! -z "$TRAVIS_TAG" ]]; then
docker tag $DOCKER_REPO:latest $DOCKER_REPO:$TRAVIS_TAG;
docker push $DOCKER_REPO:$TRAVIS_TAG;
fi
- if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "master" ]]; then
docker tag $DOCKER_REPO:latest $DOCKER_REPO:latest;
docker push $DOCKER_REPO:latest;
fi
- if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_BRANCH" == "develop" ]]; then
docker tag $DOCKER_REPO:latest $DOCKER_REPO:develop;
docker push $DOCKER_REPO:develop;
fi
notifications:
slack:
on_pull_requests: false
on_success: always
on_failure: always
rooms:
secure: Q5zbSSr7BYJs2KYZM7gFCmS+SBGgQUFsA/TNCbrSyqu/tvYA3y+ctIoNT0cY/JraBJw3sqbkbBI5IwyDxc9vTm70HmxDVOAPrvzdTaPKcq9ac0gMLN8MEq/Swqpb2agatM6tjUJnF8ZFpBLoQblMKT0ntFnLF7kfVn6+EnLy7xU//E227PXggru7p4am7Bng5AmvHdOvDGHWMO/Ztkq4DqJ5yq2relMcuIBbE33q/HpOrAcQ0oght2cJf2ADvSWkE+sMjukjdZ1dwtYmJR0klG5MVZ6KLphii8VUV1hgIAIFJ9b/Geym7bAykBDnXwKJ1QHjSpsbLp2wUJ4Nw9j3BPyJg6NkPbxU15G7l5WDyDW1KwI+uQJtY5sMQbWiP8etOrYa/ms1jrN+8m2+AN3gAARyVt+3dvghTQAp3w31fvEBMutVubN4b3Yrb2oxwYdjVflHq1voM0y7WGmAle0zoZvKYgWEkMosfuwcMfpPJa7eoKQrLFHpbvTgRmAGa92qhHAUlfKIt+wMtnTDnbaAjh2/I5rmQsgW2/+6C6QV+aXyMqL+F+/Tf13xyNbaUdLr8OWPgbPBf8+7ZxYpl/X8DC+Vm/JKeJS1i69fQ9PGjcXtq02ax/85izH439QIfJTjg0kT4BR69bphwpSq0lQtI5vd3tJKinvyR3etcIUOmsk=