-
Notifications
You must be signed in to change notification settings - Fork 31
/
.travis.yml
51 lines (42 loc) · 1.79 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
branches:
only:
- develop-sling12
- develop
cache:
directories:
- $HOME/.m2
services:
- docker
jdk:
- openjdk11
env:
global:
- DOCKER_IMAGE=peregrinecms/peregrine-cms
- DOCKER_USERNAME=gastongonzalez
matrix:
- secure: x21cQdxtCEHV9BrGPmP+FzaraSoRbTAty2DDeNbycAjcJZsJt4hMcUy5tOBShCY2o/IlF6jVDHmDo3inRPbPQvhop9b4iK3vSfnzfk1cT+K2/TJw9r0ZtWS55A2nkxkG6QidJE03Oc557MY1ouJX5JTSoAm2FO5AQ+AOXorxtwSpBCGQTHGNOmRhV6CayerReaqoG8zEiVLin/uRf/vv0IqyW86vSe5mQWCRIK0V4Rjm1E8so9y/yjTxDU4KazTN6+Yu37m70pV3J42OcNr1nfF7tMjqu9RLUtxArDzmGPMKuAXYisq6tARkcB5MRZ1xVT0u25IFEKLyBYySbjMeD/fF3gra4yCnijnqGraYeXQ2IdPxf/5kcrtt85OMRG4OV3KDCrCOt64yX0t254UWccD1xN5nWm8ht61gAcpvZ8/yy/bD1MKeJvWBCpMYG5MblO33da78sMO0yY8ziSO0wO7fLx0b/0wspfz7dSlXo8FKKgj/+xKUnmi0ZWnhxwvi5fhvJIBANwmdE5Tmcy+OtgbhRoMfNHIQv3Bwqdolpp9Z8ROQxGnpUd4W4qUGz1UoO49DCwAEUz/j7E4zZKJyG4U+ZyHcFotN1KTCXkxR5O/d2Nej1jAL0fQWzuk2pAGsBkQAAbvcHtJIkmK5hCxXm3wVK9S/Cii68zfIb8QUudI=
before_script:
- branch="$(echo ${TRAVIS_BRANCH} | tr '/' '-' | tr '[:upper:]' '[:lower:]')"
- version="$(awk '$2 == "APP_VERSION" { print $3; exit }' docker/Dockerfile)"
script:
- if [ ${TRAVIS_PULL_REQUEST} != "false" ]; then BUILD_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH; else BUILD_BRANCH=$TRAVIS_BRANCH; fi
- ./travis-build.sh
- cd docker && ./builddocker.sh && ./builddocker-remote-replication.sh
- ./pushdocker-travis.sh
after_script:
- docker images
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker tag "$DOCKER_IMAGE" "${DOCKER_IMAGE}:latest"
- docker tag "$DOCKER_IMAGE" "${DOCKER_IMAGE}:${branch}"
deploy:
# Stable release
provider: script
script: docker push ${DOCKER_IMAGE}:latest
on:
branch: develop
# Development release
provider: script
script: docker push ${DOCKER_IMAGE}:${branch}
on:
branch: develop-sling12