-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
37 lines (37 loc) · 2.45 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
language: node_js
node_js:
- 8.9.3
services:
- docker
- mongodb
notifications:
email:
script:
- cd src
- docker build --network 'host' -t api .
- docker tag api:latest $DOCKER_HUB_USERNAME/api:prod
- docker push $DOCKER_HUB_USERNAME/api:prod
env:
global:
- secure: Yz1GWr2VnNJYOjD7ebSGTRgwhQwee9ti9ucmcdQDx3awpUizlwkg/36HwoZrrLfGdvCJ7SLcc7DYh6+sRnpK4FTez/QyOB8/g+ljsdSdZ7St6bXQU8ryWmU7295iXiRf5VWU139X3itb49rBxLXCwdZhMCEMy0c4aqVa7sUpEsLQUFVBQ7T/aCLDaAZ3cOwCd/S6XkPycgn6k/Nk/Anbksxe/5dm4NB8X1OfTr9RYFWK+ZyG4ZwByyK0guv5RaiJFR+Oba46w/nKnAcR0mQrEdGTAHTe62MdjP/BPwiet9P+cRL2YxfPc8ymtYtEuoCHbIf7KkdsrK/D5NwEbAzmR5I0poozeIVCuksF9XkRVz7cOqTmrKYfr9fnjrhK/eM0fSZlhQfVP6JQKF/AnNhS25J24oP/RwTmeZtdnlQKiv0vhcozn9wcvwMmAaAn4psDllkFY5tZ1ZsbwP2HnGA4W6g3QiD1eMkxmF+Qprat5X2sdtOH2xGKbdxWpVNQhdso+6c3A90Lsgu4e4lWZ7i19nlnEFyDc+e3fT/T4y23/QPR9KAAxWOTwlDfrFEPVraruMIS7xJqPq4Uh4ZftPh3HBhMoFpl0Af2QAAQAetz4rPG1SnKjHaq563UGVwlsBYv55Nl7wLt5gGQAqWjka1a8kvsdZCZIlEWE2tY656skNs=
- secure: Bwm44nPi4pK1iAKy9Vx2AccT+/9CQblREGoXFd5fdSf66nmK/DxxbFdBE/t39alW9/G8NHSnNAefxuzXzu8qIlGMzccsAtZFX0WptKz6K74ItD6GnR6V8BiL2BvKF8R/9+s2lvcqmSYlNjdw+7PZyT9rDGcgE8BGCCJY9r/e1VP/aKPwN87zwctZKClvvL+pWOc4a0d4N0GVq7mf2ZrRbO+AYHPiN1JfNlUKHV26Mgga21ohe+iZUWx67DczJcfZZnbXRQvzuVzLVPPkKJNyZ1osO0yLZEoim7EkgJf0x3CCRRg93WfG8fzTaijOlAloma6BYifId3K17SdOPX6iFkDdFEjaDdfLf1WJUOzY22WxrGMgMZmlAVLiAzUhD7AMiPTVnMsqbcaL0/GU72CC4NHUshiGN1m6ZU+XFl3ErEaY0r1PONURt+jx+//PW4Qw5WDtF29JzL//8pb80O8MTH09WsxwMpBD37HA+0Hsc4Ptdn+GYpbxsv+wiInzC4+W6qb/CbTWSrhbh4CeEYdo69Yuj4vXy9CbethfkE/vgDLRy7noPZ+DzajYjPXfWVGlrWvQxOyHubIIFcOWu+FcP5aCubxLVN3z52URMLUCURGesKvlX+XDAwj+L8nJoJuFmW0XQo/SCm2vzweltgg7bSm/pB891azKsJ0cgrS29zQ=
- SOZLUK_ENV=test
before_install:
- openssl aes-256-cbc -K $encrypted_4f35dbab3554_key -iv $encrypted_4f35dbab3554_iv
-in deploy_key.enc -out ../../deploy_key -d
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
- docker login --username=$DOCKER_HUB_USERNAME --password=$DOCKER_HUB_PASSWORD
- openssl aes-256-cbc -K $encrypted_4f35dbab3554_key -iv $encrypted_4f35dbab3554_iv
-in deploy_key.enc -out ./deploy_key -d
- docker build --network 'host' --build-arg SOZLUK_ENV=$SOZLUK_ENV -t apitest .
deploy:
provider: script
skip_cleanup: true
script: cd .. && chmod 400 deploy_key && ssh -o StrictHostKeyChecking=no -i deploy_key
[email protected] "cd sozluk && ./deploy.sh $TRAVIS_BUILD_NUMBER"
on:
branch: master