forked from planetlabs/kubehook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
36 lines (31 loc) · 999 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
services:
- docker
go:
- 1.9.x
jobs:
include:
- stage: test
before_install:
- go get -u github.com/Masterminds/glide
- go get -u github.com/alecthomas/gometalinter
install:
- glide install
- gometalinter --install
script:
- ./scripts/test.sh
- gometalinter --fast --vendor --deadline 5m --disable gotype --disable gas --exclude "\.pb.*\.go" --exclude "_strings\.go" --exclude "_test\.go" --exclude "not checked.+Close" ./...
after_success:
- bash <(curl -s https://codecov.io/bash)
- stage: push
install: skip
script:
- VERSION=$(git rev-parse --short HEAD)
- docker build --tag "planetlabs/kubehook:latest" .
- docker build --tag "planetlabs/kubehook:${VERSION}" .
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
- ./scripts/push.sh
stages:
- name: test
- name: push
if: branch = master and not type = pull_request