-
Notifications
You must be signed in to change notification settings - Fork 26
/
.travis.yml
44 lines (35 loc) · 1.04 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
sudo: required
services:
- docker
language: go
go:
- 1.12.x
git:
depth: 1
env:
global:
- GO111MODULE=on
install:
# install dependencies needed by jobs
- wget https://github.com/kubernetes-sigs/kubebuilder/releases/download/v2.0.0-beta.0/kubebuilder_2.0.0-beta.0_linux_amd64.tar.gz
- tar -zxvf kubebuilder_2.0.0-beta.0_linux_amd64.tar.gz
- sudo mv kubebuilder_2.0.0-beta.0_linux_amd64 /usr/local/kubebuilder
jobs:
include:
- stage: unit-test
if: type IN (push, pull_request)
script:
- make cover
- bash <(curl -s https://codecov.io/bash)
- stage: publish-latest-image
if: branch = master AND type = push
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- make docker-build
- make docker-push
- stage: publish-tagged-image
if: tag IS present
script:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- TAG=${TRAVIS_TAG} make docker-build
- TAG=${TRAVIS_TAG} make docker-push