forked from brancz/kube-rbac-proxy
-
Notifications
You must be signed in to change notification settings - Fork 25
/
.travis.yml
42 lines (35 loc) · 1.16 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
---
language: go
go:
- '1.13.x'
go_import_path: github.com/brancz/kube-rbac-proxy
env:
- GO111MODULE=on
cache:
directories:
- $GOCACHE
- $GOPATH/pkg/mod
services:
- docker
jobs:
include:
- name: Integration Tests
stage: test
before_script:
- curl -Lo kind https://github.com/kubernetes-sigs/kind/releases/download/v0.7.0/kind-linux-amd64 && chmod +x kind && sudo mv kind /usr/local/bin/
- kind create cluster --config test/e2e/kind-config/kind-config.yaml
script:
- VERSION=local make container
- kind load docker-image quay.io/brancz/kube-rbac-proxy:local
- make test-e2e
- name: Push container images
stage: push-docker-image
script:
- "sudo chmod o+x /etc/docker"
- "echo ${QUAY_PASSWORD} | docker login -u ${QUAY_USERNAME} --password-stdin quay.io"
- '[ "$TRAVIS_BRANCH" = "master" ] && VERSION="$(git rev-parse --abbrev-ref HEAD | tr / -)-$(date +%Y-%m-%d)-$(git rev-parse --short HEAD)" make push || :'
- '[ -n "$TRAVIS_TAG" ] && VERSION=$TRAVIS_TAG make push || :'
stages:
- name: test
- name: push-docker-image
if: (type != pull_request)