Skip to content

Commit

Permalink
Push tagged docker images (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
tekenstam authored Aug 21, 2019
1 parent d48bb32 commit 3afba8c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
18 changes: 13 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
language: go
sudo: required

services:
- docker

language: go

go:
- 1.12.x

Expand All @@ -21,16 +23,22 @@ install:

jobs:
include:

- stage: unit-test
if: type IN (push, pull_request)
script:
- make test
- bash <(curl -s https://codecov.io/bash)

- stage: publish-image
if: type = push
- 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
- 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
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@

# Image URL to use all building/pushing image targets
IMG ?= orkaproj/kube-forensics-controller:latest
WORKERIMG ?= orkaproj/kube-forensics-worker:latest
TAG ?= latest
IMG ?= orkaproj/kube-forensics-controller:${TAG}
WORKERIMG ?= orkaproj/kube-forensics-worker:${TAG}

# Produce CRDs that work back to Kubernetes 1.11 (no version conversion)
CRD_OPTIONS ?= "crd:trivialVersions=true"
Expand Down

0 comments on commit 3afba8c

Please sign in to comment.