4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 TOPDIR=$(shell readlink -f .|sed -e 's/\/docker\/.*//')
17 MKINCLUDE=$(TOPDIR)/docker/mk
18 MKBUILD=$(TOPDIR)/docker/build
24 REPOSITORY_BASE ?= http://osm-download.etsi.org/repository/osm/debian
25 RELEASE ?= ReleaseEIGHT-daily
26 REPOSITORY_KEY ?= OSM%20ETSI%20Release%20Key.gpg
28 NO_CACHE ?= --no-cache
30 LOWER_MDG = $(shell echo $(MDG) | tr '[:upper:]' '[:lower:]')
32 CONTAINER_NAME ?= $(LOWER_MDG)
35 DOCKER_ARGS = $(CMD_DOCKER_ARGS)
37 DEPS := MON IM LCM RO common osmclient devops NBI policy-module Keystone N2VC lightui ngui PLA tests
39 DEPS_TARGETS = $(addprefix $(MKBUILD)/.dep_, $(DEPS))
46 $(MKBUILD)/.dep_policy-module:
47 $Q$(MKINCLUDE)/get_version.sh -r $(REPOSITORY) -R $(RELEASE) -k $(REPOSITORY_KEY) -u $(REPOSITORY_BASE) -m POL -p policy-module > $@
49 $(MKBUILD)/.dep_lightui:
50 $Q$(MKINCLUDE)/get_version.sh -r $(REPOSITORY) -R $(RELEASE) -k $(REPOSITORY_KEY) -u $(REPOSITORY_BASE) -m LW-UI -p lightui > $@
53 $Q$(MKINCLUDE)/get_version.sh -r $(REPOSITORY) -R $(RELEASE) -k $(REPOSITORY_KEY) -u $(REPOSITORY_BASE) -m NG-UI -p ngui > $@
56 $Q$(MKINCLUDE)/get_version.sh -r $(REPOSITORY) -R $(RELEASE) -k $(REPOSITORY_KEY) -u $(REPOSITORY_BASE) -m $* > $@
58 build: $(MKBUILD) $(DEPS_TARGETS)
59 $Qdocker build -t opensourcemano/$(LOWER_MDG):$(TAG) \
60 --build-arg RELEASE=$(RELEASE) \
61 --build-arg REPOSITORY=$(REPOSITORY) \
62 --build-arg REPOSITORY_KEY=$(REPOSITORY_KEY) \
63 --build-arg REPOSITORY_BASE=$(REPOSITORY_BASE) \
64 --build-arg MON_VERSION==$(shell cat $(MKBUILD)/.dep_MON) \
65 --build-arg IM_VERSION==$(shell cat $(MKBUILD)/.dep_IM) \
66 --build-arg RO_VERSION==$(shell cat $(MKBUILD)/.dep_RO) \
67 --build-arg LCM_VERSION==$(shell cat $(MKBUILD)/.dep_LCM) \
68 --build-arg COMMON_VERSION==$(shell cat $(MKBUILD)/.dep_common) \
69 --build-arg OSMCLIENT_VERSION==$(shell cat $(MKBUILD)/.dep_osmclient) \
70 --build-arg NBI_VERSION==$(shell cat $(MKBUILD)/.dep_NBI) \
71 --build-arg POL_VERSION==$(shell cat $(MKBUILD)/.dep_policy-module) \
72 --build-arg PLA_VERSION==$(shell cat $(MKBUILD)/.dep_PLA) \
73 --build-arg DEVOPS_VERSION==$(shell cat $(MKBUILD)/.dep_devops) \
74 --build-arg N2VC_VERSION==$(shell cat $(MKBUILD)/.dep_N2VC) \
75 --build-arg LWUI_VERSION==$(shell cat $(MKBUILD)/.dep_lightui) \
76 --build-arg NGUI_VERSION==$(shell cat $(MKBUILD)/.dep_ngui) \
77 --build-arg TESTS_VERSION==$(shell cat $(MKBUILD)/.dep_tests) \
81 rm -f $(MKBUILD)/.dep*
84 docker tag opensourcemano/$(CONTAINER_NAME):$(INPUT_TAG) opensourcemano/$(LOWER_MDG):$(TAG)
87 docker push opensourcemano/$(LOWER_MDG):$(TAG)