f_tackerpluginbuild: Fix obsolete mitaka branch
[fuel.git] / build / Makefile
index 56acb40..6ce6dbd 100644 (file)
@@ -18,14 +18,14 @@ SHELL = /bin/bash
 # BEGIN of variables to customize
 #
 #Input args
-export MOSVERSION = 9.0
+export MOSVERSION = 10.0
 export ISOSRC = file:$(shell pwd)/fuel-$(MOSVERSION).iso
 export ISOCACHE = $(shell pwd)/$(shell basename $(ISOSRC))
-export PRODNO = "OPNFV_FUEL"
+export PRODNO ?= "OPNFV_FUEL"
 export REVSTATE = "P0000"
 export USER ?= $(shell whoami)
 export BUILD_DATE = $(shell date --utc +%Y-%m-%d:%H:%M)
-export OPNFV_GIT_SHA = $(shell git rev-parse HEAD)
+export OPNFV_GIT_SHA ?= $(shell git rev-parse HEAD)
 # Store in /etc/fuel_build_id on fuel master
 export BUILD_ID := $(PRODNO)_$(BUILD_DATE)_$(OPNFV_GIT_SHA)
 
@@ -51,16 +51,19 @@ 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 MIRROR_UBUNTU_URL ?= $(shell ./f_isoroot/f_repobuild/select_ubuntu_repo.sh)
+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-)
+ifeq (,$(MIRROR_UBUNTU_URL))
+$(warning $(shell ./f_isoroot/f_repobuild/select_ubuntu_repo.sh -d))
+$(error No sane Ubuntu mirror available)
+endif
 
 export LATEST_MIRROR_ID_URL := http://$(shell ./select_closest_fuel_mirror.py)
 
 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/$(MOSVERSION).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/mos$(MOSVERSION)-centos7/os.target.txt" | head -1)
 export MIRROR_FUEL := "$(LATEST_MIRROR_ID_URL)/mos-repos/centos/mos$(MOSVERSION)-centos7/$(LATEST_TARGET_CENTOS)/x86_64"
 
@@ -181,7 +184,7 @@ deepclean: clean clean-cache
        docker rmi opnfv.org/ubuntu-builder:14.04 &>/dev/null || exit 0
        docker rmi opnfv.org/ubuntu-builder:latest &>/dev/null || exit 0
        docker rmi ubuntu:14.04 &>/dev/null || exit 0
-       @if docker images | grep -q "ubuntu *14.04"; then \
+       @if docker images | grep -q "^ubuntu *14.04"; then \
                echo "Error: ubuntu:14.04 still present!"; \
                exit 1; \
        fi