aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolas Hermanns <nikolas.hermanns@ericsson.com>2016-04-11 14:46:05 +0200
committerNikolas Hermanns <nikolas.hermanns@ericsson.com>2016-04-11 17:01:25 +0200
commitf3c8e6128170c6027753bcc9f70863852e132451 (patch)
tree0a26a5236529b054bb65d0bede7604d923fc5f8e
parent2bf79e8ab955b189c3d806b678b8f11c4966331d (diff)
Redo config of plugin build
- Split up config into a new config file - add revision to better point to a branch instrad of a revision. Change-Id: I341138973b56fb0807478ee08cab039ab31d6503
-rw-r--r--build/f_isoroot/f_odlpluginbuild/Makefile21
-rw-r--r--build/f_isoroot/f_odlpluginbuild/config.mk17
2 files changed, 30 insertions, 8 deletions
diff --git a/build/f_isoroot/f_odlpluginbuild/Makefile b/build/f_isoroot/f_odlpluginbuild/Makefile
index e8afd4a9b..9cb8fef69 100644
--- a/build/f_isoroot/f_odlpluginbuild/Makefile
+++ b/build/f_isoroot/f_odlpluginbuild/Makefile
@@ -8,13 +8,9 @@
##############################################################################
TOP := $(shell pwd)
-ODL_BRANCH=brahmaputra-sr2
-ODL_REPO="https://github.com/openstack/fuel-plugin-opendaylight.git"
-export USE_JAVA8=true
-export JAVA8_URL=https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa/+files/openjdk-8-jre-headless_8u72-b15-1~trusty1_amd64.deb
-export ODL_TARBALL_LOCATION=https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.4.1-Beryllium-SR1/distribution-karaf-0.4.1-Beryllium-SR1.tar.gz
-export ODL_VERSION_NUMBER=0.4.1
+include config.mk
+
.PHONY: all
all: .odlbuild
@@ -35,6 +31,10 @@ release:.odlbuild
sudo gem install fpm
sudo pip install fuel-plugin-builder
git clone -b $(ODL_BRANCH) $(ODL_REPO)
+ cd fuel-plugin-opendaylight; \
+ if [ -n $(ODL_CHANGE) ]; then \
+ git checkout $(ODL_CHANGE); \
+ fi
fpb --debug --build fuel-plugin-opendaylight/
mv fuel-plugin-opendaylight/opendaylight*.rpm .
$(REPOINFO) -r . > gitinfo_odlplugin.txt
@@ -53,8 +53,13 @@ release:.odlbuild
# - The SHA1 hash of the HEAD on the plugin repo's $(ODL_BRANCH)
# - The contents of this Makefile
.cacheid:
- @$(CACHETOOL) getcommitid $(ODL_REPO) $(ODL_BRANCH) > .cachedata
- sha1sum Makefile >> .cachedata
+ if [ -n $(ODL_CHANGE) ]; then \
+ $(CACHETOOL) getcommitid $(ODL_REPO) $(ODL_CHANGE) > .cachedata; \
+ else \
+ $(CACHETOOL) getcommitid $(ODL_REPO) $(ODL_BRANCH) > .cachedata; \
+ fi
+ @sha1sum Makefile | awk {'print $$1'} >> .cachedata
+ @sha1sum config.mk | awk {'print $$1'} >> .cachedata
cat .cachedata | $(CACHETOOL) getid > .cacheid
# Clean local data related to caching - called prior to ordinary build
diff --git a/build/f_isoroot/f_odlpluginbuild/config.mk b/build/f_isoroot/f_odlpluginbuild/config.mk
new file mode 100644
index 000000000..a94d7e215
--- /dev/null
+++ b/build/f_isoroot/f_odlpluginbuild/config.mk
@@ -0,0 +1,17 @@
+##############################################################################
+# Copyright (c) 2015 Ericsson AB and others.
+# jonas.bjurel@eicsson.com
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+ODL_BRANCH=brahmaputra-sr2
+ODL_CHANGE=b876df2345bf8c785dceea74f4c271fdfcc9563c
+ODL_REPO="https://github.com/openstack/fuel-plugin-opendaylight.git"
+
+export USE_JAVA8=true
+export JAVA8_URL=https://launchpad.net/~openjdk-r/+archive/ubuntu/ppa/+files/openjdk-8-jre-headless_8u72-b15-1~trusty1_amd64.deb
+export ODL_TARBALL_LOCATION=https://nexus.opendaylight.org/content/repositories/opendaylight.release/org/opendaylight/integration/distribution-karaf/0.4.1-Beryllium-SR1/distribution-karaf-0.4.1-Beryllium-SR1.tar.gz
+export ODL_VERSION_NUMBER=0.4.1