multi-arch travis build

This commit is contained in:
Stefan Prodan
2018-01-05 20:04:41 +02:00
parent fe9bfc8bfe
commit 4bd67929fb
2 changed files with 30 additions and 10 deletions

27
.travis Normal file
View File

@@ -0,0 +1,27 @@
sudo: required
language: go
go:
- 1.9.x
services:
- docker
addons:
apt:
packages:
- docker-ce
before_install:
- go get github.com/estesp/manifest-tool
script:
- make build docker-build
after_success:
- if [ -z "DOCKER_USER" ]; then
echo "PR build, skipping Docker Hub push";
else
docker login -u $DOCKER_USER -p $DOCKER_PASS;
make docker-push;
fi

View File

@@ -2,17 +2,13 @@
#
# The release version is controlled from pkg/version
#
# Prerequsitesx:
# Prerequisites:
# 1) docker login (change the DOCKER_REPOSITORY to match your Docker Hub user)
# 2) go get github.com/estesp/manifest-tool
EMPTY:=
SPACE:=$(EMPTY) $(EMPTY)
COMMA:=$(EMPTY),$(EMPTY)
ifeq (, $(shell which manifest-tool))
$(error "No manifest-tool in $$PATH, install with: go get github.com/estesp/manifest-tool")
endif
DOCKER_REPOSITORY:=stefanprodan
NAME:=podinfo
VERSION:=$(shell grep 'VERSION' pkg/version/version.go | awk '{ print $$4 }' | tr -d '"')
@@ -21,9 +17,6 @@ GITCOMMIT:=$(shell git describe --dirty --always)
LINUX_ARCH:=amd64 arm arm64 ppc64le
PLATFORMS:=$(subst $(SPACE),$(COMMA),$(foreach arch,$(LINUX_ARCH),linux/$(arch)))
all:
@echo Use the 'release' target to start a release
release: build tar
docker: docker-build docker-push