language: go

go:
  - '1.12.x'

go_import_path: github.com/brancz/kube-rbac-proxy

env:
  - GO111MODULE=on

cache:
  directories:
  - $GOCACHE
  - $GOPATH/pkg/mod

services:
  - docker

jobs:
  include:
    - stage: Integration Tests
      before_script:
        - curl -Lo kind https://github.com/kubernetes-sigs/kind/releases/download/0.2.1/kind-linux-amd64 && chmod +x kind && sudo mv kind /usr/local/bin/
        - kind create cluster
        - export KUBECONFIG="$(kind get kubeconfig-path)"
      script:
        - VERSION=local make container
        - kind load docker-image quay.io/brancz/kube-rbac-proxy:local
        - make test-e2e
