Update Makefile
This ps updates the build commands to allow the same format to be used in att-comdev projects Change-Id: If6189795e1b54656ca38d006f630844b17208c58
This commit is contained in:
parent
9573b179cb
commit
bde0e4260e
13
Makefile
13
Makefile
|
@ -12,6 +12,7 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
DOCKER_REGISTRY ?= quay.io
|
||||||
REGION_SUFFIX ?= maas-region
|
REGION_SUFFIX ?= maas-region
|
||||||
IMG_COMMON_DIR ?= images
|
IMG_COMMON_DIR ?= images
|
||||||
REGION_IMG_DIR ?= images/maas-region-controller
|
REGION_IMG_DIR ?= images/maas-region-controller
|
||||||
|
@ -25,16 +26,16 @@ HELM ?= helm
|
||||||
PROXY ?= http://one.proxy.att.com:8080
|
PROXY ?= http://one.proxy.att.com:8080
|
||||||
USE_PROXY ?= false
|
USE_PROXY ?= false
|
||||||
LABEL ?= commit-id
|
LABEL ?= commit-id
|
||||||
IMAGE_LIST := maas-rack-controller maas-region-controller sstream-cache
|
IMAGE_NAME := maas-rack-controller maas-region-controller sstream-cache
|
||||||
|
|
||||||
.PHONY: images
|
.PHONY: images
|
||||||
#Build all images in the list
|
#Build all images in the list
|
||||||
images: $(IMAGE_LIST)
|
images: $(IMAGE_NAME)
|
||||||
|
|
||||||
$(IMAGE_LIST):
|
$(IMAGE_NAME):
|
||||||
@echo
|
@echo
|
||||||
@echo "===== Processing [$@] image ====="
|
@echo "===== Processing [$@] image ====="
|
||||||
@make build IMAGE_SUFFIX=$@ IMAGE_DIR=images/$@
|
@make build IMAGE=${DOCKER_REGISTRY}/${IMAGE_PREFIX}/$@:${IMAGE_TAG} IMAGE_DIR=images/$@
|
||||||
|
|
||||||
# Create tgz of the chart
|
# Create tgz of the chart
|
||||||
.PHONY: charts
|
.PHONY: charts
|
||||||
|
@ -56,9 +57,9 @@ dry-run: helm_lint
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
ifeq ($(USE_PROXY), true)
|
ifeq ($(USE_PROXY), true)
|
||||||
docker build -t $(IMAGE_PREFIX)/$(IMAGE_SUFFIX):$(IMAGE_TAG) --label $(LABEL) -f $(IMAGE_DIR)/Dockerfile $(IMAGE_DIR) --build-arg http_proxy=$(PROXY) --build-arg https_proxy=$(PROXY)
|
docker build -t $(IMAGE) --label $(LABEL) -f $(IMAGE_DIR)/Dockerfile --build-arg http_proxy=$(PROXY) --build-arg https_proxy=$(PROXY) $(IMAGE_DIR)
|
||||||
else
|
else
|
||||||
docker build -t $(IMAGE_PREFIX)/$(IMAGE_SUFFIX):$(IMAGE_TAG) --label $(LABEL) -f $(IMAGE_DIR)/Dockerfile $(IMAGE_DIR)
|
docker build -t $(IMAGE) --label $(LABEL) -f $(IMAGE_DIR)/Dockerfile $(IMAGE_DIR)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
Loading…
Reference in New Issue