forked from keikoproj/active-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
36 lines (29 loc) · 893 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
language: go
go:
- 1.13.x
git:
depth: 1
env:
global:
- GO111MODULE=on
cache:
directories:
- $GOPATH/pkg/mod
before_install:
# install dependencies needed by jobs
- wget https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.3.0/kubebuilder_2.3.0_linux_amd64.tar.gz
- tar -zxvf kubebuilder_2.3.0_linux_amd64.tar.gz
- sudo mv kubebuilder_2.3.0_linux_amd64 /usr/local/kubebuilder
jobs:
include:
- stage: unit-test
script:
- make test
- bash <(curl -s https://codecov.io/bash)
- stage: publish-image
if: type = push
script:
- echo $DOCKER_PASSWORD | docker login -u $DOCKER_USERNAME --password-stdin
- if [ $TRAVIS_TAG ]; then export IMG=keikoproj/active-monitor:$TRAVIS_TAG; else export IMG=keikoproj/active-monitor:$(echo $TRAVIS_COMMIT | cut -c-10); fi
- make docker-build
- make docker-push