From d2c32e2e38e4102dc54a24c57c76426a6ef14e98 Mon Sep 17 00:00:00 2001 From: Rolf Neugebauer Date: Thu, 18 May 2017 17:54:28 +0100 Subject: [PATCH] pkg: Make Hub org/repository build time configurable Update the Makefiles of the remaining packages. Signed-off-by: Rolf Neugebauer --- pkg/metadata/Makefile | 11 ++++++----- pkg/node_exporter/Makefile | 7 ++++--- pkg/sysctl/Makefile | 11 ++++++----- pkg/sysfs/Makefile | 11 ++++++----- 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/pkg/metadata/Makefile b/pkg/metadata/Makefile index 4d560745a..1d42a8d53 100644 --- a/pkg/metadata/Makefile +++ b/pkg/metadata/Makefile @@ -4,6 +4,7 @@ SHA_IMAGE=alpine:3.5@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c METADATA_BINARY=usr/bin/metadata +ORG?=linuxkit IMAGE=metadata .PHONY: tag push clean container @@ -26,15 +27,15 @@ hash: Dockerfile $(DEPS) find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash push: hash container - docker pull linuxkit/$(IMAGE):$(shell cat hash) || \ - (docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \ - docker push linuxkit/$(IMAGE):$(shell cat hash)) + docker pull $(ORG)/$(IMAGE):$(shell cat hash) || \ + (docker tag $(IMAGE):build $(ORG)/$(IMAGE):$(shell cat hash) && \ + docker push $(ORG)/$(IMAGE):$(shell cat hash)) docker rmi $(IMAGE):build rm -f hash tag: hash container - docker pull linuxkit/$(IMAGE):$(shell cat hash) || \ - docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) + docker pull $(ORG)/$(IMAGE):$(shell cat hash) || \ + docker tag $(IMAGE):build $(ORG)/$(IMAGE):$(shell cat hash) docker rmi $(IMAGE):build rm -f hash diff --git a/pkg/node_exporter/Makefile b/pkg/node_exporter/Makefile index a0d23be2f..467d7dc0d 100644 --- a/pkg/node_exporter/Makefile +++ b/pkg/node_exporter/Makefile @@ -1,14 +1,15 @@ .PHONY: tag push default: push +ORG?=linuxkit IMAGE=node_exporter DEPS=Dockerfile HASH?=$(shell git ls-tree HEAD -- ../$(notdir $(CURDIR)) | awk '{print $$3}') tag: $(DEPS) - docker build --no-cache --network=none -t linuxkit/$(IMAGE):$(HASH) . + docker build --no-cache --network=none -t $(ORG)/$(IMAGE):$(HASH) . push: tag - docker pull linuxkit/$(IMAGE):$(HASH) || \ - docker push linuxkit/$(IMAGE):$(HASH) + docker pull $(ORG)/$(IMAGE):$(HASH) || \ + docker push $(ORG)/$(IMAGE):$(HASH) diff --git a/pkg/sysctl/Makefile b/pkg/sysctl/Makefile index 9a7a4c9db..058a30c12 100644 --- a/pkg/sysctl/Makefile +++ b/pkg/sysctl/Makefile @@ -4,6 +4,7 @@ SHA_IMAGE=alpine:3.5@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c SYSCTL_BINARY=usr/bin/sysctl +ORG?=linuxkit IMAGE=sysctl .PHONY: tag push clean container @@ -26,15 +27,15 @@ hash: Dockerfile $(DEPS) find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash push: hash container - docker pull linuxkit/$(IMAGE):$(shell cat hash) || \ - (docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \ - docker push linuxkit/$(IMAGE):$(shell cat hash)) + docker pull $(ORG)/$(IMAGE):$(shell cat hash) || \ + (docker tag $(IMAGE):build $(ORG)/$(IMAGE):$(shell cat hash) && \ + docker push $(ORG)/$(IMAGE):$(shell cat hash)) docker rmi $(IMAGE):build rm -f hash tag: hash container - docker pull linuxkit/$(IMAGE):$(shell cat hash) || \ - docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) + docker pull $(ORG)/$(IMAGE):$(shell cat hash) || \ + docker tag $(IMAGE):build $(ORG)/$(IMAGE):$(shell cat hash) docker rmi $(IMAGE):build rm -f hash diff --git a/pkg/sysfs/Makefile b/pkg/sysfs/Makefile index 525741be2..d6e3b28c7 100644 --- a/pkg/sysfs/Makefile +++ b/pkg/sysfs/Makefile @@ -4,6 +4,7 @@ SHA_IMAGE=alpine:3.5@sha256:dfbd4a3a8ebca874ebd2474f044a0b33600d4523d03b0df76e5c SYSFS_BINARY=usr/bin/sysfs +ORG?=linuxkit IMAGE=sysfs .PHONY: tag push clean container @@ -26,15 +27,15 @@ hash: Dockerfile $(DEPS) find $^ -type f | xargs cat | docker run --rm -i $(SHA_IMAGE) sha1sum - | sed 's/ .*//' > hash push: hash container - docker pull linuxkit/$(IMAGE):$(shell cat hash) || \ - (docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) && \ - docker push linuxkit/$(IMAGE):$(shell cat hash)) + docker pull $(ORG)/$(IMAGE):$(shell cat hash) || \ + (docker tag $(IMAGE):build $(ORG)/$(IMAGE):$(shell cat hash) && \ + docker push $(ORG)/$(IMAGE):$(shell cat hash)) docker rmi $(IMAGE):build rm -f hash tag: hash container - docker pull linuxkit/$(IMAGE):$(shell cat hash) || \ - docker tag $(IMAGE):build linuxkit/$(IMAGE):$(shell cat hash) + docker pull $(ORG)/$(IMAGE):$(shell cat hash) || \ + docker tag $(IMAGE):build $(ORG)/$(IMAGE):$(shell cat hash) docker rmi $(IMAGE):build rm -f hash