Skip to content

Commit

Permalink
travis: automate pushing images when building from tag
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfantom committed Apr 29, 2020
1 parent a335db0 commit 342f265
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
language: go

go:
Expand All @@ -18,11 +19,22 @@ services:

jobs:
include:
- stage: Integration Tests
- 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:
- "echo ${QUAY_PASSWORD} | docker login -u ${QUAY_USERNAME} --password-stdin quay.io"
- VERSION=$TRAVIS_TAG make push

stages:
- name: test
- name: push-docker-image
if: (type != pull_request) AND (tag =~ ^v)

0 comments on commit 342f265

Please sign in to comment.