Redo config of plugin build 53/12153/2
authorNikolas Hermanns <nikolas.hermanns@ericsson.com>
Mon, 11 Apr 2016 12:46:05 +0000 (14:46 +0200)
committerNikolas Hermanns <nikolas.hermanns@ericsson.com>
Mon, 11 Apr 2016 15:45:02 +0000 (15:45 +0000)
- Split up config into a new config file
- add revision to better point to a branch
  instrad of a revision.

Change-Id: I341138973b56fb0807478ee08cab039ab31d6503

build/f_isoroot/f_odlpluginbuild/Makefile
build/f_isoroot/f_odlpluginbuild/config.mk [new file with mode: 0644]

index e8afd4a..9cb8fef 100644 (file)
@@ -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 (file)
index 0000000..a94d7e2
--- /dev/null
@@ -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