Merge "Use e1000 network driver in virtual labs" into stable/brahmaputra
[fuel.git] / build / f_isoroot / f_ovs-nsh-dpdk-pluginbuild / Makefile
index 601ec1e..f89f8d9 100644 (file)
@@ -37,7 +37,7 @@ release:.ovsbuild
        @rm -rf fuel-plugin-ovs
        sudo apt-get -y install build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev
        sudo pip install fuel-plugin-builder
-       ./install_docker.sh
+       ../../docker/ubuntu-builder/install_docker.sh
        git clone $(OVS_NSH_DPDK_REPO)
        cd fuel-plugin-ovs; \
        git checkout $(OVS_NSH_DPDK_BRANCH); \
@@ -50,6 +50,9 @@ release:.ovsbuild
        $(REPOINFO) -r . > gitinfo_ovs-nsh-dpdk-plugin.txt
        @rm -rf fuel-plugin-ovs
        @touch .ovsbuild
+       # Store artifact in cache straight away if caching is enabled
+       # (no .cacheid will be present unless this is a cached build)
+       test -f .cacheid && $(MAKE) -f Makefile put-cache || exit 0
 
 #############################################################################
 # Cache operations - only used when building through ci/build.sh
@@ -60,7 +63,11 @@ release:.ovsbuild
 #   - The SHA1 hash of the HEAD on the plugin repo's $(OVS_NSH_DPDK_BRANCH)
 #   - The contents of this Makefile
 .cacheid:
-       @git ls-remote --heads $(OVS_NSH_DPDK_REPO) | grep $(OVS_NSH_DPDK_BRANCH) | awk {'print $$1'} > .cachedata
+       @if [ ! -z $(OVS_NSH_DPDK_CHANGE) ]; then \
+         $(CACHETOOL) getcommitid $(OVS_NSH_DPDK_REPO) $(OVS_NSH_DPDK_CHANGE) > .cachedata; \
+       else \
+         $(CACHETOOL) getcommitid $(OVS_NSH_DPDK_REPO) $(OVS_NSH_DPDK_BRANCH) > .cachedata; \
+       fi
        @sha1sum Makefile | awk {'print $$1'} >> .cachedata
        @sha1sum config.mk | awk {'print $$1'} >> .cachedata
        @cat .cachedata | $(CACHETOOL) getid > .cacheid