X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=build%2Ff_isoroot%2Ff_bgpvpn-pluginbuild%2FMakefile;h=8ce28fcf86704b41980a3d228715a2bf001c4d58;hb=2e7b41ceaf260e29c4237cd25eed3aa2e34fb4fa;hp=3da8d38b90e8e885bd94a85761d005492c2b5457;hpb=429392e6041fd5777c9a5a437f6455bca0fe3ed8;p=fuel.git diff --git a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile index 3da8d38b9..8ce28fcf8 100644 --- a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile +++ b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile @@ -32,13 +32,9 @@ release:.bgpvpnbuild @mkdir -p ../release/bgpvpn @cp bgpvpn*.rpm ../release/opnfv/ cp gitinfo_bgpvpnplugin.txt $(BUILD_BASE) - cd $(BUILD_BASE) && mkdir -p ../deploy/templates/plugins && cp -rf $(TOP)/config/* ../deploy/templates/plugins .bgpvpnbuild: rm -rf fuel-plugin-bgpvpn - sudo apt-get -y install build-essential ruby-dev rubygems-integration python-pip git rpm createrepo dpkg-dev - sudo gem install fpm - sudo pip install fuel-plugin-builder git clone $(BGPVPN_REPO) cd fuel-plugin-bgpvpn; \ git checkout $(BGPVPN_BRANCH); \ @@ -51,6 +47,9 @@ release:.bgpvpnbuild $(REPOINFO) -r . > gitinfo_bgpvpnplugin.txt rm -rf fuel-plugin-bgpvpn touch .bgpvpnbuild + # 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 @@ -61,13 +60,14 @@ release:.bgpvpnbuild # - The SHA1 hash of the HEAD on the plugin repo's $(BGPVPN_BRANCH) # - The contents of this Makefile .cacheid: - if [ ! -z $(BGPVPN_CHANGE) ]; then \ + @if [ ! -z $(BGPVPN_CHANGE) ]; then \ $(CACHETOOL) getcommitid $(BGPVPN_REPO) $(BGPVPN_CHANGE) > .cachedata; \ else \ $(CACHETOOL) getcommitid $(BGPVPN_REPO) $(BGPVPN_BRANCH) > .cachedata; \ fi sha1sum Makefile >> .cachedata sha1sum config.mk >> .cachedata + echo -n $(UBUNTU_ARCH) | sha1sum | awk {'print $$1'} >> .cachedata cat .cachedata | $(CACHETOOL) getid > .cacheid # Clean local data related to caching - called prior to ordinary build