forked from globocom/GloboNetworkAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
65 lines (47 loc) · 1.65 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
# Use bash as the language to avoid extra time during VM boot
language: bash
# Do not use any notification by email
notifications:
email: false
# Travis by default try to run git submodules. Avoid this to reduce boot time
git:
submodules: false
# Only starts CI on branches master and develop. For others run it manually
branches:
only:
- master
- develop
sudo: required
dist: trusty
# Run docker service. Necessary to start services containers
services:
- docker
# Before every task start containers using docker-compose
before_install:
- docker network create globonetworkapi_netapi_net
- sudo docker-compose --file scripts/travis/docker-compose-sdn-travis.yml up -d
- sudo docker-compose up -d
- ./scripts/travis/wait_for_containers.sh
- docker ps --all
# Define CI stages and its order
stages:
- test # Runs tests in parallel for each django application
# Parallel execution of each job of each stage
jobs:
include:
- stage: test
script: make test_ci app=networkapi/api_environment
- script: make test_ci app=networkapi/plugins/SDN
- script: make test_ci app=networkapi/api_ip
- script: make test_ci app=networkapi/api_network
- script: make test_ci app=networkapi/api_environment_vip
- script: make test_ci app=networkapi/api_asn
- script: make test_ci app=networkapi/api_interface
- script: make test_ci app=networkapi/api_list_config_bgp
- script: make test_ci app=networkapi/api_rack
# If any job fail run the following commands to help debug
after_failure:
- docker exec ovs1 ovs-vsctl show
- docker ps --all
- docker exec netapi_app tail /tmp/networkapi.log
- ping netapi_odl -c 1