mirror of
https://github.com/stefanprodan/podinfo.git
synced 2026-05-06 01:27:05 +00:00
multi-arch travis build
This commit is contained in:
27
.travis
Normal file
27
.travis
Normal 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
|
||||
13
Makefile
13
Makefile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user