-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (32 loc) · 1.7 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
language: generic
if: tag IS blank
services:
- docker
before_script:
- DOCKER_IMAGE=$DOCKER_USERNAME/$APP:$(git describe --always --abbrev --tags --long)
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
- docker build -t $DOCKER_IMAGE .
script:
- docker run -d $DOCKER_IMAGE
after_success:
- docker push $DOCKER_IMAGE
before_deploy:
- echo $HOST_KNOWN >> ~/.ssh/known_hosts
- echo $HOST_DEV_KNOWN >> ~/.ssh/known_hosts
- openssl aes-256-cbc -K $encrypted_db2095f63ba3_key -iv $encrypted_db2095f63ba3_iv -in .travis/deploy_rsa.enc -out ~/.ssh/deploy_rsa -d
- eval $(ssh-agent -s)
- chmod 600 ~/.ssh/deploy_rsa
- ssh-add ~/.ssh/deploy_rsa
deploy:
- provider: script
script: ./.travis/deploy.sh production $HOST $HOST_USER $HOST_PASSWORD $DOCKER_IMAGE
on:
branch: master
- provider: script
script: ./.travis/deploy.sh development $HOST_DEV $HOST_DEV_USER $HOST_DEV_PASSWORD $DOCKER_IMAGE
on:
branch: develop
notifications:
slack:
secure: "WIigI9atDQIy+d4YUiagzFbqQuFGxtlCvvvdv1caSzImsy5iYdAem3CKJm9qSOC8Ekl4iQzDahQvhTzjkD/qdl+0jcLSRpCrxJxd+0NT8da8cxdFu+4aGzR5Yr5vH33PIA8beEVBSO/ydSslTFlAQo37EtLRQ7oJmIlvvRaDU0L6pHQyxkR/Eu5Ch3UTYfq5dEvczHd/SrBl3QptGR2aA/QfIhBhxpxTIDYrpqQrVPDckPGaAy2HGKooVTbacLfkeIWZ85tURQR/ko0KyrBlsHXbSKhixF4I5LYQQ6T8vGjBE/D+tS6958fk/5fnfx2OWsXxH+/8yj4N4uKQ3mxG5V3UM6dUyk3yK68bJkElBq3+xx/MLxOTjqHsIST9hJUdN0XBg8ogX4pghLpA7KB7DcmhFztK7VlTiKEQqRSvBMl8YIij+qt+KE7SEZRFnATD9Qv0Nq1gcyF1oouyHhiCF53cWKjOeMjmrSwRMTiSKotLdlztYBSCt3e01Pm5O0WIbBjiR9l47ra6uC4Su+HzDYKzZyO7YAa0B69atYJZaN1fWl/UkJgIJExHXBOANY2tHIxwKtjwuExPtL+7w8x0uDvsIySBV8jbRpr7BRCuw0aD/RpS3Fq2P+arl6rNz3chp8CnIaHorm5qtNBAtq0U+yTYIyvwP0D7BokR0tDVn7c="
on_pull_requests: false