1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-04-07 01:33:31 +00:00
kyverno/.travis.yml

48 lines
1 KiB
YAML
Raw Normal View History

2019-06-04 14:28:18 -07:00
language: go
go:
2020-01-14 10:19:17 +05:30
- "1.13"
2019-06-04 14:28:18 -07:00
cache:
directories:
- $HOME/.cache/go-build
- $GOPATH/pkg/mod
2019-06-04 14:50:46 -07:00
# safelist
branches:
only:
- master
2019-10-02 15:27:40 -07:00
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
2020-01-14 10:19:17 +05:30
install: go get ./...
2019-06-04 14:28:18 -07:00
2020-01-14 10:19:17 +05:30
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
2019-10-17 10:33:50 -07:00
# only push images if the branch is master
after_success:
2019-10-17 13:50:42 -07:00
- |
2019-10-17 14:35:13 -07:00
if [ $TRAVIS_PULL_REQUEST == 'false' ]
2019-10-17 13:50:42 -07:00
then
2020-07-01 17:45:41 -07:00
docker login -u $DOCKER_USER -p $DOCKER_PASSWORD || travis_terminate 1
echo "pushing Kyverno image"
make docker-publish-initContainer || travis_terminate 1
echo "pushing Kyverno init container image"
make docker-publish-kyverno || travis_terminate 1
2020-04-29 11:09:39 -07:00
fi