-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
44 lines (38 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
37
38
39
40
41
42
---
language: python
python:
- "3.7"
services:
- docker
branches:
only:
- master
- release-.+
jobs:
include:
- stage: Test build on project; smoketest
if: type = pull_request
before_script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
script:
- docker build -t onibus-io-frontend .
- stage: Deploy project to DockerHUB
if: type = push && branch = master
before_script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- docker build -t onibus-io-frontend .
- docker tag onibus-io-frontend $DOCKER_USERNAME/onibus-io-frontend:$(cat VERSION)
- docker tag onibus-io-frontend $DOCKER_USERNAME/onibus-io-frontend:latest
script:
- docker push $DOCKER_USERNAME/onibus-io-frontend:$(cat VERSION)
- docker push $DOCKER_USERNAME/onibus-io-frontend:latest
- stage: Deploy to production server
if: type = push && branch = master
before_script:
- pip install pipenv
- openssl aes-256-cbc -K $encrypted_f4b4a98bdc3f_key -iv $encrypted_f4b4a98bdc3f_iv -in deploy/id_rsa.enc -out deploy/id_rsa -d
script:
- cd deploy
- ./run.sh
- wget https://raw.githubusercontent.com/CodeForCuritiba/datascience-kit/master/telegram_publisher.sh
- bash ./telegram_publisher.sh