forked from opensourcepos/opensourcepos
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
36 lines (36 loc) · 1.38 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
sudo: required
dist: trusty
group: deprecated-2017Q4
branches:
except:
- weblate
services:
- docker
before_install:
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- date=`date +%Y%m%d%H%M%S` && branch=${TRAVIS_BRANCH} && rev=`git rev-parse --short=6
HEAD` && sed -i "s/\$1/\$1.$date.$branch.$rev/g" deployment.json
script:
- docker run --rm -v $(pwd):/app jekkos/composer composer install
- docker run --rm -v $(pwd):/app jekkos/composer php bin/install.php translations develop
- sed -i "s/'\(dev\)'/'$rev'/g" application/config/config.php
- docker run --rm -it -v $(pwd):/app -w /app digitallyseamless/nodejs-bower-grunt
sh -c "npm install && bower install && grunt package"
- docker-compose build
- docker-compose -f docker-compose.test.yml up --abort-on-container-exit
env:
global:
- DOCKER_COMPOSE_VERSION=1.21.1
- TAG=$(echo ${TRAVIS_BRANCH} | sed s/feature\\///)
after_success:
- 'docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" && docker tag "opensourcepos_ospos:latest" "jekkos/opensourcepos:$TAG" && docker push "jekkos/opensourcepos:$TAG"'
deploy:
file: deployment.json
provider: bintray
skip_cleanup: true
key: ${BINTRAY_API_KEY}
user: jekkos
on:
all_branches: true