forked from kyverno/kyverno
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (37 loc) · 892 Bytes
/
.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
language: go
go:
- "1.13"
cache:
directories:
- $HOME/.cache/go-build
- $GOPATH/pkg/mod
# safelist
branches:
only:
- master
before_install:
- |
if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(.md)|^(LICENSE)'
then
echo "Not running CI since only docs were changed."
exit
fi
install: go get ./...
script:
# build initContainer
- make initContainer || travis_terminate 1;
# build kyverno container
- make kyverno || travis_terminate 1;
# tests
- make test-all || travis_terminate 1;
after_script:
- curl -d "repo=https://github.com/nirmata/kyverno" https://goreportcard.com/checks
# only push images if the branch is master
after_success:
- |
if [ $TRAVIS_PULL_REQUEST == 'false' ]
then
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD
make docker-publish-initContainer
make docker-publish-kyverno
fi