-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.travis.yml
54 lines (46 loc) · 1.95 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
language: python
python: 3.6
sudo: required
git:
depth: false
stages:
- name: test
- name: release
if: tag IS present
- name: deploy
if: tag IS present
jobs:
include:
- name: 'Integration test: analyzer server'
install:
- docker run -d --name bblfshd --privileged -v $HOME/bblfshd:/var/lib/bblfshd -p "9432:9432" bblfsh/bblfshd:v2.9.2
- docker exec -it bblfshd bblfshctl driver install --force java bblfsh/java-driver:v2.4.2
- pip3 install -r requirements.txt
script:
- curl https://raw.githubusercontent.com/src-d/lookout-sdk/master/_tools/install-lookout-latest.sh | bash
- (python3 -u sonarcheck_analyzer.py |& tee -a ../analyzer.log)&
- sleep 5s
# check it producer comments for file with error
- ./lookout-sdk review --from=37314b6bc0da8ff01253b4264519e9d25e14d989 --to=ef921351a8acc24643e0174cc0490a4e063ccfbc > comments.log 2>&1
- 'grep "RSPEC-2176: Class has same name as parent" comments.log'
- 'grep "status: success" comments.log'
# check it doesn't fail on request without comments
- ./lookout-sdk review --from=ef921351a8acc24643e0174cc0490a4e063ccfbc --to=90e77923b7e9d065bb4dcc564cf20ca3cacdec87 > comments.log 2>&1
- 'grep "no comments were produced" comments.log'
- 'grep "status: success" comments.log'
- name: 'Push image to Docker Hub'
stage: release
script:
- make docker-push-latest-release
- name: 'Deploy to staging'
stage: deploy
install:
- make install-helm
script:
- HELM_RELEASE=lookout-sonarcheck-analyzer HELM_CHART=lookout-sonarcheck-analyzer K8S_NAMESPACE=lookout HELM_ARGS="--tiller-namespace=lookout --repo https://src-d.github.io/charts/stable/ --set image.tag=$TRAVIS_TAG -f .helm_staging.yml" make deploy
before_cache:
# make bblfsh images readable
- sudo chmod -R 777 $HOME/bblfshd/images
cache:
directories:
- $HOME/bblfshd/images