summaryrefslogtreecommitdiffstats
path: root/build/Makefile
diff options
context:
space:
mode:
authorDan Radez <dradez@redhat.com>2015-08-31 14:59:43 -0400
committerDan Radez <dradez@redhat.com>2015-10-01 10:52:23 -0400
commitae96bbde9c2a40401929103f66cbf61b8ef2d6cb (patch)
treedb7800870df9e621a275bbe8aaa7d764571b814c /build/Makefile
parent3f313d76874b29eb0da6c6d2d3768bf7c546e0c5 (diff)
adding master support for building
updating build.sh to use RDO manager ensuring jenkins will build properly Change-Id: Id7660c49650a85958e5ff0153d9b5cc6255cb6ad Signed-off-by: Dan Radez <dradez@redhat.com>
Diffstat (limited to 'build/Makefile')
-rw-r--r--build/Makefile37
1 files changed, 20 insertions, 17 deletions
diff --git a/build/Makefile b/build/Makefile
index c33c175..c0086fc 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -15,6 +15,7 @@ SHELL = /bin/bash
#
#Input args
export UNIT_TEST = FALSE
+export USE_MASTER = ""
export INTERACTIVE = TRUE
export CENTDNLD = http://mirrors.cat.pdx.edu/centos/7.1.1503/isos/x86_64/CentOS-7-x86_64-DVD-1503-01.iso
export ISOSRC = file:$(shell pwd)/CentOS-7-x86_64-DVD-1503-01.iso
@@ -22,7 +23,7 @@ export ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC))
export PRODNO = "OPNFV_BGS"
export REVSTATE = "P0000"
export NEWISO = $(shell pwd)/release/OPNFV-CentOS-7-x86_64-${REVSTATE}.iso
-export GENESISRPM = $(shell pwd)/x86_64/opnfv-genesis-0.1-1.x86_64.rpm
+export APEXRPM = $(shell pwd)/x86_64/opnfv-apex-2.0-1.x86_64.rpm
# Note! Invoke with "make REVSTATE=RXXXX all" to make release build!
# Invoke with ICOCACHE=/full/path/to/iso if cached ISO is in non-standard location.
@@ -80,7 +81,7 @@ build-clean: $(SUBCLEAN)
@rm -f $(NEWISO)
.PHONY: clean $(SUBCLEAN)
-clean: clean-cache $(SUBCLEAN)
+clean: clean-cache instack-clean $(SUBCLEAN)
@rm -f *.iso
@rm -Rf release
@rm -Rf newiso
@@ -92,44 +93,46 @@ $(SUBCLEAN): %.clean:
.PHONY: rpm-clean
rpm-clean:
- rpmbuild --clean opnfv-genesis.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)'
+ @rm -f build/opnfv-apex.tar.gz
.PHONY: rpm
rpm:
- pushd ../../ && git archive --format=tar --prefix=opnfv-genesis-0.1/ HEAD | gzip > foreman/build/opnfv-genesis.tar.gz
- rpmbuild -ba opnfv-genesis.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)'
- @make rpm-clean
+ pushd ../ && git archive --format=tar --prefix=opnfv-apex-2.0/ HEAD > build/opnfv-apex.tar
+ tar -u --xform="s:instack.qcow2:opnfv-apex-2.0/build/instack.qcow2:" --file=opnfv-apex.tar instack.qcow2
+ gzip -f opnfv-apex.tar
+ rpmbuild -ba opnfv-apex.spec -D '_topdir %(echo `pwd`)' -D '_builddir %(echo `pwd`)' -D '_sourcedir %(echo `pwd`)' -D '_rpmdir %(echo `pwd`)' -D '_specdir %(echo `pwd`)' -D '_srcrpmdir %(echo `pwd`)'
.PHONY: instack
instack: instack.qcow2
instack.qcow2:
- @./instack.sh
+ @./instack.sh $(USE_MASTER)
.PHONY: instack-clean
instack-clean:
- @virsh destroy instack 2> /dev/null || echo -n ''
- @virsh undefine instack 2> /dev/null || echo -n ''
- @virsh destroy baremetal_0 2> /dev/null || echo -n ''
- @virsh undefine baremetal_0 2> /dev/null || echo -n ''
- @virsh destroy baremetal_1 2> /dev/null || echo -n ''
- @virsh undefine baremetal_1 2> /dev/null || echo -n ''
+ #@virsh destroy instack 2> /dev/null || echo -n ''
+ #@virsh undefine instack 2> /dev/null || echo -n ''
+ #@virsh destroy baremetal_0 2> /dev/null || echo -n ''
+ #@virsh undefine baremetal_0 2> /dev/null || echo -n ''
+ #@virsh destroy baremetal_1 2> /dev/null || echo -n ''
+ #@virsh undefine baremetal_1 2> /dev/null || echo -n ''
+ rm -f instackenv.json
+ rm -f baremetal_0.xml
+ rm -f baremetal_1.xml
rm -f instack.xml
rm -f instack.qcow2
rm -rf stack
-# Todo: Make things smarter - we shouldn't need to clean everything
-# betwen make invocations.
.PHONY: iso
-iso: build-clean $(ISOCACHE) instack.qcow2 rpm
+iso: build-clean instack.qcow2 rpm $(ISOCACHE)
@make mount-centiso
@mkdir centos release
cp -r $(CENTDIR)/* centos
@make umount-centiso
# modify the installer iso's contents
@cp -f isolinux.cfg centos/isolinux/isolinux.cfg
- @cp $(GENESISRPM) centos/Packages
+ @cp $(APEXRPM) centos/Packages
# regenerate yum repo data
@echo "Generating new yum metadata"
createrepo --update -g ../c7-opnfv-x86_64-comps.xml centos