From: Cristina Pauna Date: Thu, 2 May 2019 13:48:48 +0000 (+0300) Subject: Update the docker registry X-Git-Tag: 2.0.0~95 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F06%2F606%2F5;p=validation.git 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 --- 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