-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
109 lines (105 loc) · 3.52 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
matrix:
include:
- language: python
env: COMMAND=sentinel_connectors
sudo: required
dist: xenial
python: "3.6.7"
cache:
pip: true
before_install:
- git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '^(sentinel_connectors/|sentinel_common/|\.travis.yml)' || exit 0
- cd sentinel_connectors
install:
- make requirements
script:
- make tests
- make lint
deploy:
- provider: codedeploy
region: eu-central-1
revision_type: github
application: sentinel-connectors-app
deployment_group: sentinel-connectors-depgrp
wait_until_deployed: true
on:
branch: master
- language: python
env: COMMAND=sentinel_backend
sudo: required
services:
- docker
dist: xenial
python: "3.6.7"
cache:
pip: true
before_install:
- git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '^(beanstalk/backend|sentinel_backend/|sentinel_common/|\.travis.yml)' || exit 0
script:
- docker build -f sentinel_backend/Dockerfile -t balindwalinstalin/sentinel-backend:latest .
- docker run --entrypoint make balindwalinstalin/sentinel-backend:latest lint
before_deploy:
- docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWD
- docker push balindwalinstalin/sentinel-backend:latest
- cd beanstalk/backend
- zip -r ../../sentinel-backend.zip .
- cd ../..
deploy:
provider: elasticbeanstalk
region: eu-central-1
app: sentinel_backend
env: sentinel-backend-env
zip_file: sentinel-backend.zip
bucket_name: elasticbeanstalk-eu-central-1-848201210986
on:
branch: master
skip_cleanup: true
- language: python
env: COMMAND=sentinel_lambda
sudo: required
dist: xenial
python: "3.6.7"
cache:
directories:
- node_modules
pip: true
before_install:
- git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '^(sentinel_lambda/|sentinel_common/|\.travis.yml)' || exit 0
- cd sentinel_lambda
- nvm install 6
- node --version
- npm --version
install:
- cd sentinel-analizer
- python -m venv .env
- npm install -g serverless
- npm install --save serverless-python-requirements
script:
- echo script_dummy
after_script:
- cd sentinel-analizer
- test $TRAVIS_BRANCH = "master" && test $TRAVIS_PULL_REQUEST = "false" && serverless deploy -v --aws-s3-accelerate
- language: node_js
env: COMMAND=sentinel_web
node_js:
- 12.2
before_install:
- git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qE '^(beanstalk/web|sentinel_web/|sentinel_common/|\.travis.yml)' || exit 0
script:
- docker build -f sentinel_web/release/Dockerfile -t balindwalinstalin/sentinel-web:latest sentinel_web
before_deploy:
- docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWD
- docker push balindwalinstalin/sentinel-web:latest
- cd beanstalk/web
- zip -r ../../sentinel-web.zip .
- cd ../..
deploy:
provider: elasticbeanstalk
region: eu-central-1
app: sentinel_frontend
env: sentinel-frontend-env
zip_file: sentinel-web.zip
bucket_name: elasticbeanstalk-eu-central-1-848201210986
on:
branch: master
skip_cleanup: true