forked from opennetworkinglab/fabric-p4test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
45 lines (36 loc) · 1.14 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
dist: trusty
language: python
services:
- docker
python:
- "2.7"
env:
matrix:
- ONOS_BRANCH: master
PROFILES: "'all'"
- ONOS_BRANCH: onos-2.1
PROFILES: "'fabric fabric-spgw fabric-int fabric-spgw-int'"
- ONOS_BRANCH: onos-1.15
PROFILES: "'fabric fabric-spgw fabric-int fabric-spgw-int'"
before_install:
- docker pull $DOCKER_REPO
install:
- pip install pycodestyle
- docker build --cache-from $DOCKER_REPO -t fp4test .
- docker tag fp4test $DOCKER_REPO
- git clone --depth 1 https://github.com/opennetworkinglab/onos /tmp/onos -b $ONOS_BRANCH
script:
- docker run --privileged --rm -v $PWD:/fp4test -v /tmp/onos:/onos fp4test bash /fp4test/travis/run_test.sh /onos $PROFILES
jobs:
include:
- stage: checkstyle
name: "Checkstyle"
script: find . -name \*.py -exec pycodestyle --max-line-length=120 --ignore=E126,E127,E722,E502,E131 {} +
- stage: push
name: "Docker push"
script: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin && docker push $DOCKER_REPO
stages:
- test
- checkstyle
- name: push
if: type != pull_request AND branch = master