forked from kabanero-io/events-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (47 loc) · 1.15 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
os: linux
language: go
go:
- 1.13
go_import_path: github.com/kabanero-io/events-operator
stages:
- build
- test
- deploy
jobs:
include:
- name: Build docker image
stage: build
before_script:
- make vet
script:
- make build-image
after_success:
- echo "Image build succeeded and tagged."
after_failure:
- echo "Image build failed."
- name: Run tests
stage: test
before_install:
- travis_retry make tidy
install:
- go get -v github.com/onsi/ginkgo/ginkgo
- go get -v github.com/onsi/gomega
- export PATH=$PATH:$HOME/gopath/bin
- make test-setup
script:
- make test
after_success:
- echo "Tests passed."
after_failure:
- echo "Tests failed."
- name: Push image
stage: deploy
if: branch = master AND fork = false AND type != pull_request AND env(DOCKER_USERNAME) IS NOT blank AND env(DOCKER_TOKEN) IS NOT blank
script:
- make build-image
- docker login -u ${DOCKER_USERNAME} -p ${DOCKER_TOKEN}
- make push-image
after_success:
- echo "Image push to repository was successful."
after_failure:
- echo "Image push to repository failed."