X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=build%2Ff_isoroot%2Ff_repobuild%2FMakefile;h=7c6b163047ad425fc0ea4416a00d9c366e9c6caf;hb=5b24755186a36c79f03596d52cd4ba2627791470;hp=27eb05eeb740eef1b79db3657aafa4d23d57e746;hpb=f126512730bc9a6f434ac5b9f6395bfc4b5dc960;p=fuel.git diff --git a/build/f_isoroot/f_repobuild/Makefile b/build/f_isoroot/f_repobuild/Makefile index 27eb05eeb..7c6b16304 100644 --- a/build/f_isoroot/f_repobuild/Makefile +++ b/build/f_isoroot/f_repobuild/Makefile @@ -10,10 +10,10 @@ SHELL := /bin/bash TOP := $(shell pwd) -UBUNTU_DIR := $(shell dirname $(MIRROR_UBUNTU_ROOT)) -TMP_ROOT_DIR := $(shell echo "$(UBUNTU_DIR)" | cut -d "/" -f2) +TMP_ROOT_DIR := $(shell echo "$(MIRROR_UBUNTU_ROOT)" | cut -d "/" -f2) include ../../config.mk +include config.mk export MOS_VERSION export OPENSTACK_VERSION @@ -25,7 +25,8 @@ nailgun: sudo apt-get install -y git libxml2-dev libxslt-dev python-dev python-pip libz-dev libyaml-dev createrepo python-yaml rm -Rf nailgun sudo mkdir -p /var/www/nailgun - git clone -b $(FUEL_MAIN_TAG) https://github.com/openstack/fuel-mirror + git clone $(FUEL_MIRROR_REPO) + cd fuel-mirror && git checkout -q $(FUEL_MIRROR_COMMIT) sudo pip install -U -r ./fuel-mirror/requirements.txt sudo pip install ./fuel-mirror sudo pip install ./fuel-mirror/contrib/fuel_mirror @@ -33,9 +34,11 @@ nailgun: sudo fuel-mirror --debug --config ./opnfv-config.yaml create --group ubuntu --pattern=ubuntu sudo chmod -R 755 /var/www/nailgun cp -Rp /var/www/nailgun . - if [ "$(UBUNTU_DIR)" != "/" ]; then \ - mv nailgun/mirrors$(UBUNTU_DIR)/ubuntu nailgun/mirrors/ubuntu;\ - rm -rf nailgun/mirrors/$(TMP_ROOT_DIR);\ + # On the end we want to have ubuntu repository in mirrors/ubuntu directory + -if [ "$(MIRROR_UBUNTU_ROOT)" != "/ubuntu/" ]; then \ + mkdir -p nailgun/mirrors/ubuntu;\ + mv nailgun/mirrors$(MIRROR_UBUNTU_ROOT)* nailgun/mirrors/ubuntu;\ + [ "$(MIRROR_UBUNTU_ROOT)" != "/" ] && rm -rf nailgun/mirrors/$(TMP_ROOT_DIR);\ fi # Store artifact in cache straight away if caching is enabled # (no .cacheid will be present unless this is a cached build) @@ -43,7 +46,7 @@ nailgun: .PHONY: clean clean: - @rm -rf ../release/opnfv/nailgun nailgun fuel-mirror + @rm -rf ../release/opnfv/nailgun nailgun fuel-mirror opnfv-config.yaml ubuntu.yaml .PHONY: release release:nailgun @@ -62,6 +65,9 @@ release:nailgun .cacheid: date +"Repocache %G%V" > .cachedata sha1sum Makefile >> .cachedata + sha1sum config.mk >> .cachedata + $(CACHETOOL) packages >> .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