forked from integr8ly/cloud-resource-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
55 lines (47 loc) · 1.3 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
language: go
sudo: required
dist: bionic
go:
- 1.13.x
env:
- GO111MODULE=on
addons:
apt:
update: true
packages:
- "python3"
- "python3-pip"
- "python3-setuptools"
git:
depth: 1
stages:
- name: test
- name: push
if: fork = false
- name: manifest
if: fork = false AND tag IS present
before_install:
- go get github.com/mattn/goveralls
- go get github.com/securego/gosec/cmd/gosec
- go get golang.org/x/lint/golint
jobs:
include:
- stage: test
script:
- go get github.com/mattn/goveralls
- make test/unit/setup
- make code/check
- make test/unit/ci
- $GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken=$COVERALLS_TOKEN
- make code/audit
- stage: push
script:
- docker login --password "$QUAY_PASSWORD" --username "$QUAY_USERNAME" quay.io
- export TAG=$(git rev-parse --short ${TRAVIS_COMMIT})
- make image/push VERSION=$TAG
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then make image/push VERSION=$TRAVIS_BRANCH; fi
- stage: manifest
script:
- docker login --password "$QUAY_PASSWORD" --username "$QUAY_USERNAME" quay.io
- alias python=python3
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then make image/push; fi