-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
50 lines (40 loc) · 1.12 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
# SPDX-FileCopyrightText: 2019-present Open Networking Foundation <[email protected]>
#
# SPDX-License-Identifier: Apache-2.0
sudo: false
language: go
go:
- '1.13.x'
services:
- 'docker'
notifications:
email: false
branches:
only:
- master
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
cache:
directories:
- $HOME/gopath/pkg/mod # Cache the Go modules
before_script:
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin latest
- pushd .. && git clone https://github.com/onosproject/build-tools.git && popd
jobs:
include:
- stage: docs build
if: type != pull_request
script:
- sh ../build-tools/build/travis/trigger-travis atomix docs master "`git rev-parse --short HEAD`" $TRAVIS_API_TOKEN
- stage: test
script:
- make test
deploy:
- provider: script
script: 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash ./build/bin/push-images; fi'
on:
branch: master
- provider: script
script: VERSION=$TRAVIS_TAG ./build/bin/push-images
on:
tags: true
all_branches: true