tools/Makefile
Mario Alfredo Carrillo Arevalo 402961394e Update Makefile
Now the Makefile will be dedicated to build just one docker image,
this commit updates the Makefile rules.

Story: 2003712
Task: 226370
Depends-On: https://review.openstack.org/#/c/601306/

Change-Id: Icaf303ce387cab39eea25c5079e27edb73afad89
Signed-off-by: Mario Alfredo Carrillo Arevalo <mario.alfredo.c.arevalo@intel.com>
2018-11-08 21:20:44 -06:00

45 lines
1.1 KiB
Makefile

# TC Build container
# Set defaults that may be overridden in the buidrc
MY_TC_RELEASE := tis-r5-pike
UID := $(shell id -u)
USER := $(shell id -un)
# Import the build config
NULL := $(shell bash -c "source buildrc; set | sed -E '/^[[:alnum:]_]+/s/=/:=/' | sed 's/^//' > .makeenv")
include .makeenv
MYUNAME ?= $(USER)
TC_CONTAINER_NAME := $(MYUNAME)-centos-builder
TC_CONTAINER_TAG := local/$(MYUNAME)-stx-builder:7.4
TC_DOCKERFILE := Dockerfile
all:
docker build \
--build-arg MYUID=$(UID) \
--build-arg MYUNAME=$(MYUNAME) \
--ulimit core=0 \
--network host \
-t $(TC_CONTAINER_TAG) \
-f $(TC_DOCKERFILE) \
.
clean:
docker rm $(TC_CONTAINER_NAME) || true
docker image rm $(TC_CONTAINER_TAG)
env:
@echo "TC_DOCKERFILE=$(TC_DOCKERFILE)"
@echo "TC_CONTAINER_NAME=$(TC_CONTAINER_NAME)"
@echo "TC_CONTAINER_TAG=$(TC_CONTAINER_TAG)"
@echo "SOURCE_REMOTE_NAME=$(SOURCE_REMOTE_NAME)"
@echo "SOURCE_REMOTE_URI=$(SOURCE_REMOTE_URI)"
@echo "HOST_MIRROR_DIR=$(HOST_MIRROR_DIR)"
@echo "MY_TC_RELEASE=$(MY_TC_RELEASE)"
@echo "LOCALDISK=${LOCALDISK}"
@echo "GUEST_LOCALDISK=${GUEST_LOCALDISK}"
.PHONY: all clean env