Merge pull request #14 from pmsipilot/deploy-docker
chore: Automatically deploy the docker image
This commit is contained in:
commit
01c9ac26c6
2 changed files with 34 additions and 0 deletions
23
.travis.yml
23
.travis.yml
|
@ -1,5 +1,10 @@
|
|||
language: php
|
||||
|
||||
sudo: required
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
||||
php:
|
||||
- 7.0
|
||||
- nightly
|
||||
|
@ -9,9 +14,27 @@ env:
|
|||
- COMPOSERFLAGS="--prefer-stable"
|
||||
- COMPOSERFLAGS="--prefer-lowest"
|
||||
|
||||
global:
|
||||
# DOCKER_EMAIL
|
||||
- secure: JAbpFtQJovMT1IqHJmSlVI3xQpLUoqDlbYXUgExK99dH7+GH78Rd6CgjCo5fDAw5KW4zBoTJut7BWv+qdF1j9qpUEXlxB6dEwKdLHCCM8M9p+BddkaZUWF9kG+4pC1h6AeDeWi7Q77TzrOX7VAP1UubFOPItRNayF99zCJH6ioh8qnHNi2XHedIagMW4PGLp6HmTuyhzdF6RVEXcCos2fpkx5wzcjALb/ffN8A0dqtfELRvs6bjaQZ1ktmNjd3fSnQOtGO14VOei8E58e4roZNdDHMoIxzeqaM+bphsTZvHne4DAZEn3wU2iguzXLZMCAgF336Inu+t2Rjv4UDLcPeppMrYA+02Ww0kbCXcIQx4Og0Un54SY5qdIHZtnTXA+SAFr+5r+T80p29Tlp9cUfxaHWFynDEEDWx7minAATweSQU50ipPnAkge1WY/ADSN1EARqM2GYVQYLvddIaTSIbnq37MnlncWL+jkcQ0cL83xidYd7JnQ7/gZJf9MzeZzMVXrY+2VYL1WOrv1uwmVi30bpQss1D7IVVtN5iBlB2ciph+iHdvkhv6f8ji9xZmWkotfDzsRoZg7csDAVgliz55QkJYKeWDoiW7kb1i+pIsgmrdEonPMg7NHjSqIIkrwI89016Tsx4LH1t2sRRYW8Z7wuVhW3VcJD+CnkhAWvLc=
|
||||
# DOCKER_USER
|
||||
- secure: "bdD/Sg7IvpY/qLBK8KiaMBihGx00sj+K3+qHnHoqzqqz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J5fT4X5kz+YYLQEFxeWPtxL+OpQUXx2P5iDhx5qz173lO4h1WX4vEQ3p4aFbfnNREUDPGYsMJo6flm5Azq8F0qh065sxPldKunr9H4fAXrFzqMJnTepReEGPNJRn35TLl08RI7GTp0hKxlaycsu+c2Qz0/GcKbODWf5w24d/pxrOMM9KmJpDZTBm9bWiZlRbbZm1OnK0PiaRi9ft44Em5NYTFVvuWL2M2tIyGObI3kquKTkANvrSuPTofJ0JawXg2YBKOH8="
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
|
||||
script:
|
||||
- make test
|
||||
|
||||
deploy:
|
||||
- provider: script
|
||||
script: ci/deploy.sh
|
||||
on:
|
||||
all_branches: master
|
||||
- provider: script
|
||||
script: ci/deploy.sh
|
||||
on:
|
||||
tags: true
|
||||
|
|
11
ci/deploy.sh
Executable file
11
ci/deploy.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/bin/bash
|
||||
|
||||
export REPO=pmsipilot/docker-compose-viz
|
||||
export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
|
||||
|
||||
git reset --hard
|
||||
composer install --no-dev --prefer-dist --classmap-authoritative
|
||||
|
||||
docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
|
||||
docker build -f Dockerfile -t $REPO:$TAG .
|
||||
docker push $REPO
|
Loading…
Reference in a new issue