forked from magma/magma
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
205 lines (183 loc) · 6.15 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
matrix:
include:
- stage: Tests
language: python
name: Run container-based Orchestrator cloud tests for FWA
os: linux
dist: xenial
python:
- "3.7"
services:
- docker
env:
- MAGMA_ROOT=$TRAVIS_BUILD_DIR
install:
- pip3 install PyYAML
script:
- cd ${MAGMA_ROOT}/orc8r/cloud/docker
- python3 build.py -t
- stage: Tests
language: go
name: FeG precommit
os: linux
dist: xenial
go:
- 1.13.x
env:
- MAGMA_ROOT=$TRAVIS_BUILD_DIR GO111MODULE=on
before_install:
- ./travis/golang_before_install.sh
before_script:
- sudo ln -s $MAGMA_ROOT/config/feg /etc/magma
script:
- cd ${MAGMA_ROOT}/feg/gateway
- travis_retry travis_wait go mod download
- make -C ${MAGMA_ROOT}/feg/gateway precommit
- stage: Tests
language: go
name: CWAG precommit
go:
- 1.12.x
os: linux
dist: xenial
env:
- MAGMA_ROOT=$TRAVIS_BUILD_DIR GO111MODULE=on GOPROXY=https://proxy.golang.org
before_install:
- ./travis/golang_before_install.sh
script:
- cd ${MAGMA_ROOT}/cwf/gateway
- travis_retry travis_wait go mod download
- make -C ${MAGMA_ROOT}/cwf/gateway precommit
- stage: Tests
language: go
name: orc8r gateway go tests
go:
- 1.12.x
os: linux
dist: xenial
env:
- MAGMA_ROOT=$TRAVIS_BUILD_DIR GO111MODULE=on GOPROXY=https://proxy.golang.org
script:
- cd ${MAGMA_ROOT}/orc8r/gateway/go
- travis_retry travis_wait go mod download
- go test ./...
- go vet ./...
- stage: Tests
language: minimal
name: LTE gateway python unit tests
os: linux
dist: xenial
env:
- MAGMA_ROOT=$TRAVIS_BUILD_DIR PYTHON_BUILD=$TRAVIS_BUILD_DIR/build PIP_CACHE_HOME=$TRAVIS_BUILD_DIR/.pipcache MAGMA_DEV_MODE=1 SKIP_SUDO_TESTS=1
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libsystemd-dev pkg-config
- sudo apt-get install -y virtualenv python-babel python-dev build-essential python3-setuptools python-setuptools autogen autoconf libtool python3-apt python3-aioeventlet python3-requests python3-pip python-protobuf
# Install protobuf compiler
- sudo curl -Lfs https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-linux-x86_64.zip -o protoc3.zip
- sudo unzip protoc3.zip -d protoc3
- sudo mv protoc3/bin/protoc /bin/protoc
- sudo chmod a+rx /bin/protoc
- sudo mv protoc3/include/google /usr/include/
- sudo chmod -R a+Xr /usr/include/google
- sudo rm -rf protoc3.zip protoc3
script:
- make -C $MAGMA_ROOT/lte/gateway/python test_all
- stage: Tests
name: Verifying generated files are in-sync
language: python
os: linux
dist: xenial
python:
- "3.7"
services:
- docker
env:
- MAGMA_ROOT=${TRAVIS_BUILD_DIR}
- MAGMA_MODULES_FILE=${TRAVIS_BUILD_DIR}/travis/modules.yml
install:
- pip3 install PyYAML
script:
- cd ${MAGMA_ROOT}/orc8r/cloud/docker
- python3 build.py -g
- cd ${TRAVIS_BUILD_DIR}
- git add .
- git status
# This command will exit 1 if there are any changes to the git clone
- git diff-index --quiet HEAD
- stage: Build
language: python
name: Build core Orchestrator containers
os: linux
dist: xenial
python:
- "3.7"
services:
- docker
env:
- MAGMA_ROOT=$TRAVIS_BUILD_DIR
install:
- pip3 install PyYAML
script:
- cd ${MAGMA_ROOT}/orc8r/cloud/docker
- python3 build.py --nocache
- stage: Build
language: python
name: Build noncore Orchestrator containers
os: linux
dist: xenial
python:
- "3.7"
services:
- docker
env:
- MAGMA_ROOT=$TRAVIS_BUILD_DIR
install:
- pip3 install PyYAML
script:
- cd ${MAGMA_ROOT}/orc8r/cloud/docker
- python3 build.py -nc
- stage: Build
language: minimal
name: Build NMS
os: linux
dist: xenial
services:
- docker
env:
- NMS_ROOT=$TRAVIS_BUILD_DIR/symphony/app/fbcnms-projects/magmalte
script:
- cd ${NMS_ROOT}
- docker-compose build magmalte
- stage: Build
name: FOSSA analyze
language: generic
env:
- MAGMA_ROOT=${TRAVIS_BUILD_DIR}
go:
- "1.13.x"
python:
- "3.7"
before_install:
- cd /tmp
- wget https://github.com/fossas/fossa-cli/releases/download/v1.0.11/fossa-cli_1.0.11_linux_amd64.tar.gz
- bash -c 'sha256sum fossa-cli_1.0.11_linux_amd64.tar.gz | grep -q 0e20286630a9bc5a17408c81e6ba9003f91a14fdd680b96ca4def400693e028e'
- sudo rm -f /tmp/fossa
- tar xzf fossa-cli_1.0.11_linux_amd64.tar.gz
- sudo cp /tmp/fossa /usr/local/bin/
script:
- ${MAGMA_ROOT}/travis/fossa-analyze-go.sh
stages:
- Tests
- Build
notifications:
slack:
rooms:
- secure: "IKyVU47tsxlYOql5QOr2rBOrKRpdTy0dOgzzc5YYEKgYu+w4uvSrq2tmAYSjVqcQmfs3etinNQJz7sZZ38bgUmL/hm+c8dY6Lfyc8xJX6XUcnWzPvRhZXvNL0m5xdTmHMQCzlWrq6wSwY2ncmS2AYyYWGMHDG4v+I2Vrg9wiJJhkSY0L7rQnUbTpx/UM7SInMCV6S1yiNchKJEsgxSLZknSMf93vTiCKgK0WJRvpSXuhUJma8vgb2qYW79MgWHfqaSEy08kilNXCHowHHmvfgBub3n5rfrWgKVXvIKCE/LtmgvrYXb/zEKVpBRSDKMbNNlYlsmare8OO55rdX2jntIHEVfMQ9X8PaeK7G1faKBeYBamZOMeZK6rgo1DTJ2cobiGRA2nDgXLAofLF4QhF4MloJUFGmX03QDgOXjdijDtYFrgjFuy+vzTRL++m+4HS4Fe7uMMr4mjYw4CkkNEgc9K9j9DZKtPqsMS+c09KyDC7nfalvImduL/2SVjb0lI9U9DFCIQ+LhMVTrKuhMNUGQgoWqhsVMPvzLfoDvOJjp40AqAmHBHZOUQxbbjmnU7sHyCptSS1GkqnR3EON3BX9rhYhMrPBAqUsMugorokgA04yttvLcuPldXcKVwdlqn7NxrDBKz4Ul1EPSuxazm3YTuIrKTfi8r91gXhniMY6sw="
on_success: change
on_failure: always
on_pull_requests: false