b227beeafd0447c20609b84c2a4a9c6efaf6cf8a
[genesis.git] / fuel / build / f_odl_docker / Makefile
1 ##############################################################################
2 # Copyright (c) 2015 Ericsson AB and others.
3 # stefan.k.berg@ericsson.com
4 # jonas.bjurel@ericsson.com
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11 TOP := $(shell pwd)
12 BUILDTAG := loving_daniel
13
14 # Edit this to match the GENESIS / OPNFV in your environment
15 export OPNFV_PUPPET := /home/lmcdasm/MAR24/genesis/common/puppet-opnfv
16 include ../config.mk
17
18 .PHONY: all
19 all:
20         @mkdir -p puppet/modules/opnfv/odl_docker
21         @rm -rf tmp
22         @mkdir -p tmp
23         @cp -Rvp ${OPNFV_PUPPET}/manifests/templates/dockerfile tmp/.
24         @docker build -t ${BUILDTAG} tmp/dockerfile/.
25         @docker save ${BUILDTAG} > puppet/modules/opnfv/odl_docker/odl_docker_image.tar
26         @wget ${DOCKER_REPO}/${DOCKER_TAG} -O  puppet/modules/opnfv/odl_docker/docker-latest
27         @echo "OPFNV_PUPPET is: ${OPNFV_PUPPET}"
28         @cp -Rvp ${OPNFV_PUPPET}/manifests/templates/dockerfile/compute_scripts  puppet/modules/opnfv
29
30 .PHONY: clean
31 clean:
32         @rm -rf tmp
33         @rm -rf release
34
35 .PHONY: build-clean
36 build-clean:
37         @rm -rf tmp
38         @rm -rf release
39         @rm -rf puppet/modules/opnfv/odl_docker/odl_docker_image.tar
40         @rm -rf puppet/modules/opnfv/odl_docker/docker-latest
41
42
43 .PHONY: release
44 release:
45         # Fetch PP from OPNFV Common
46         @cp -Rvp ${OPNFV_PUPPET}/common/puppet-opnfv/manifests/odl_docker.pp ${PUPPET_DEST}
47         @cp -Rvp puppet/modules/* $(PUPPET_DEST)