summaryrefslogtreecommitdiffstats
path: root/build/Makefile
diff options
context:
space:
mode:
authorMichal Skalski <mskalski@mirantis.com>2016-01-21 02:17:11 +0100
committerStefan Berg <sfb@consultron.com>2016-01-29 13:59:45 +0100
commit606b2a90b53842290aa091b5ab0e75ccbcae231c (patch)
tree7c17c20f909b53c5f4871b3f9026307e056ec4a2 /build/Makefile
parent80b903bcafeaf10c8d4f1270599d1c770703abab (diff)
Use mirrors snapshots
Add logic to fetch information about last suitable snapshot which can be used to download ubuntu packages. This is for example use to build community ISO [1]. This should help in case of snapshot switch [2]. [1] https://github.com/fuel-infra/jenkins-jobs/blob/master/servers/fuel-ci/8.0/builders/community.all.sh#L36-L40 [2] https://bugs.launchpad.net/fuel/+bug/1493390/comments/9 Change-Id: Id5a8d41278561473ea4844631bfefa0049e64dbc Signed-off-by: Michal Skalski <mskalski@mirantis.com> (cherry picked from commit 394c79fe428faa9c50ed1db6d750b363b44130b9)
Diffstat (limited to 'build/Makefile')
-rw-r--r--build/Makefile18
1 files changed, 18 insertions, 0 deletions
diff --git a/build/Makefile b/build/Makefile
index 6a74ad941..9465bf3a3 100644
--- a/build/Makefile
+++ b/build/Makefile
@@ -43,6 +43,24 @@ export DOCKERIMG = opnfv.org/ubuntu-builder:14.04
export TOPDIR := $(shell pwd)
export REPOINFO := $(BUILD_BASE)/repo_info.sh
+# Use snapshots
+# Use nearby repositories
+export MIRROR_UBUNTU_URL := $(shell ./f_isoroot/f_repobuild/select_ubuntu_repo.sh --url)
+export MIRROR_UBUNTU := $(shell echo "$(MIRROR_UBUNTU_URL)" | cut -d'/' -f3 )
+export MIRROR_UBUNTU_ROOT := $(shell echo -n '/' ; echo "$(MIRROR_UBUNTU_URL)" | cut -d'/' -f4-)
+
+export LATEST_MIRROR_ID_URL := http://mirror.seed-us1.fuel-infra.org
+
+export MIRROR_MOS_UBUNTU := $(shell echo "$(LATEST_MIRROR_ID_URL)" | cut -d'/' -f3)
+export LATEST_TARGET_UBUNTU := $(shell curl -sSf "$(MIRROR_MOS_UBUNTU)/mos-repos/ubuntu/8.0.target.txt" | head -1)
+export MIRROR_MOS_UBUNTU_ROOT := "/mos-repos/ubuntu/$(LATEST_TARGET_UBUNTU)"
+
+export LATEST_TARGET_CENTOS := $(shell curl -sSf "$(LATEST_MIRROR_ID_URL)/mos-repos/centos/mos8.0-centos7-fuel/os.target.txt" | head -1)
+export MIRROR_FUEL := "$(LATEST_MIRROR_ID_URL)/mos-repos/centos/mos8.0-centos7-fuel/$(LATEST_TARGET_CENTOS)/x86_64"
+
+# uncomment and use: make print-VARIABLE
+#print-% : ; @echo $* = $($*)
+
#Build subclasses
SUBDIRS := f_isoroot