forked from onosproject/config-models
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (33 loc) · 1.01 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
sudo: false
language: go
go:
- '1.14.x'
services:
- docker
notifications:
email: false
branches:
only:
- master
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 v1.23.7
- pushd .. && git clone https://github.com/onosproject/build-tools.git && popd
before_install:
- 'if [[ $TRAVIS_PULL_REQUEST == "false" && $TRAVIS_BRANCH == "master" && $TRAVIS_SECURE_ENV_VARS == "true" ]] ; then
openssl aes-256-cbc -K $encrypted_f217180e22ee_key -iv $encrypted_f217180e22ee_iv -in .ssh/id_rsa.enc -out ~/.ssh/id_rsa -d &&
chmod 600 ~/.ssh/id_rsa;
fi'
jobs:
include:
- stage: tests
if: type == pull_request || fork == false
script:
- make build
- stage: release
if: type != pull_request && fork == false
script:
- bash ./build/bin/push-images
- bash ../build-tools/release-merge-commit