From 346f2534d3995f962b8458715741fa0cba2d2ee0 Mon Sep 17 00:00:00 2001 From: Cristina Pauna Date: Thu, 2 May 2019 16:48:48 +0300 Subject: [PATCH] Update the docker registry JIRA: VAL-11 The docker registry has been created by LF at akraino/validation, thereore I updated the scripts to reflect this. Also added a make target to push the images to the repo. Change-Id: Ie608a8738b2b29d138e92a46e0b8899372736f3f Signed-off-by: Cristina Pauna --- docker/Makefile | 7 +++++++ docker/README.rst | 17 +++++++++++------ docker/build.mk | 4 ++-- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/docker/Makefile b/docker/Makefile index 65ad526..426d22d 100644 --- a/docker/Makefile +++ b/docker/Makefile @@ -25,6 +25,9 @@ all: $(SUBDIRS_NAME) .PHONY: build-all build-all: $(SUBDIRS_BUILD) +.PHONY: push-all +push-all: $(SUBDIRS_PUSH) + .PHONY: $(SUBDIRS_NAME) $(SUBDIRS_NAME): $(MAKE) -C $@ @@ -33,4 +36,8 @@ $(SUBDIRS_NAME): $(SUBDIRS_BUILD): $(SUBDIRS) $(MAKE) -C $< build +.PHONY: $(SUBDIRS_PUSH) +$(SUBDIRS_PUSH): $(SUBDIRS) + $(MAKE) -C $< .push_image + include build.mk diff --git a/docker/README.rst b/docker/README.rst index 8182b73..ac1b926 100644 --- a/docker/README.rst +++ b/docker/README.rst @@ -19,19 +19,24 @@ Overview ======== The Makefile in this directory is used to build and push all -the validation containers. The command to do that is: - make all REGISTRY= +the validation containers. The default registry is **akraino** on +dockerhub, but only CI jenkins slaves are authorized to push +images to that registry. If you want to push to your own test registry, set +the REGISTRY variables as in the commands below. + +To build and push the images: + make all [ REGISTRY= ] To just build the containers, use the command: - make build-all REGISTRY= + make build-all [ REGISTRY= ] The k8s container ================= To build just the k8s container, use the command: - make k8s-build REGISTRY= + make k8s-build [ REGISTRY= ] To both build and push the container, use the command: - make k8s REGISTRY= + make k8s [ REGISTRY= ] Container should be started with the admin.conf file mounted: docker run -ti -v /home/jenkins/admin.conf:/root/.kube/config \ -/akraino_validation:k8s-latest /bin/sh +/validation:k8s-latest /bin/sh diff --git a/docker/build.mk b/docker/build.mk index dde61fe..988f2a9 100644 --- a/docker/build.mk +++ b/docker/build.mk @@ -16,8 +16,8 @@ # declare the variables -REGISTRY ?= # TBD -NAME ?= akraino_validation +REGISTRY ?= akraino +NAME ?= validation TAG_PRE ?= $(notdir $(CURDIR)) TAG_VER ?= latest DOCKERFILE ?= Dockerfile -- 2.16.6