X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=build%2Ff_isoroot%2Ff_bgpvpn-pluginbuild%2FMakefile;h=24fa1785df129399261e89fbe8dbfa6f87936a8e;hb=ad8a87e29afa370207224975841420a29b408ea1;hp=443a8e39c30c539aecd579d8e753c3b0aaa2a3b2;hpb=fcccd8c861fac29a05155cc9e634a8d2af157a69;p=fuel.git diff --git a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile index 443a8e39c..24fa1785d 100644 --- a/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile +++ b/build/f_isoroot/f_bgpvpn-pluginbuild/Makefile @@ -32,7 +32,6 @@ 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 @@ -51,6 +50,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,7 +63,11 @@ release:.bgpvpnbuild # - The SHA1 hash of the HEAD on the plugin repo's $(BGPVPN_BRANCH) # - The contents of this Makefile .cacheid: - git ls-remote --heads $(BGPVPN_REPO) | grep $(BGPVPN_BRANCH) > .cachedata + @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 cat .cachedata | $(CACHETOOL) getid > .cacheid