Update the suffix to be overridden with 1 var
Updating this since the '-' in the build commands made it hard for Jenkins to override with one variable without repeating the maas-maas-rack-controller. w Change-Id: I9ef1644e25ad260b6d652d53e9d544758ced18f5
This commit is contained in:
parent
847b7d4965
commit
ebcf60c01a
43
Makefile
43
Makefile
|
@ -12,12 +12,12 @@
|
||||||
# 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.
|
||||||
|
|
||||||
MAAS_IMAGE_COMMON ?= maas
|
REGION_SUFFIX ?= maas-region
|
||||||
REGION_SUFFIX ?= region
|
IMG_COMMON_DIR ?= images
|
||||||
REGION_IMG_DIR ?= images/maas-region-controller
|
REGION_IMG_DIR ?= images/maas-region-controller
|
||||||
RACK_SUFFIX ?= rack
|
RACK_SUFFIX ?= maas-rack
|
||||||
RACK_IMG_DIR ?= images/maas-rack-controller
|
RACK_IMG_DIR ?= images/maas-rack-controller
|
||||||
CACHE_SUFFIX ?= cache
|
CACHE_SUFFIX ?= maas-cache
|
||||||
CACHE_IMG_DIR ?= images/sstream-cache
|
CACHE_IMG_DIR ?= images/sstream-cache
|
||||||
IMAGE_PREFIX ?= attcomdev
|
IMAGE_PREFIX ?= attcomdev
|
||||||
IMAGE_TAG ?= latest
|
IMAGE_TAG ?= latest
|
||||||
|
@ -25,9 +25,16 @@ HELM ?= helm
|
||||||
PROXY ?= http://one.proxy.att.com:8080
|
PROXY ?= http://one.proxy.att.com:8080
|
||||||
USE_PROXY ?= false
|
USE_PROXY ?= false
|
||||||
|
|
||||||
# Build all docker images for this project
|
IMAGE_LIST := maas-rack-controller maas-region-controller sstream-cache
|
||||||
|
|
||||||
.PHONY: images
|
.PHONY: images
|
||||||
images: build_maas-rack-controller build_maas-region-controller build_sstream-cache
|
#Build all images in the list
|
||||||
|
images: $(IMAGE_LIST)
|
||||||
|
|
||||||
|
$(IMAGE_LIST):
|
||||||
|
@echo
|
||||||
|
@echo "===== Processing [$@] image ====="
|
||||||
|
@make build IMAGE_SUFFIX=$@ IMAGE_DIR=images/$@
|
||||||
|
|
||||||
# Create tgz of the chart
|
# Create tgz of the chart
|
||||||
.PHONY: charts
|
.PHONY: charts
|
||||||
|
@ -47,28 +54,12 @@ dry-run: clean
|
||||||
|
|
||||||
# Make targets intended for use by the primary targets above.
|
# Make targets intended for use by the primary targets above.
|
||||||
|
|
||||||
.PHONY: build_maas-rack-controller
|
.PHONY: build
|
||||||
build_maas-rack-controller:
|
build:
|
||||||
ifeq ($(USE_PROXY), true)
|
ifeq ($(USE_PROXY), true)
|
||||||
docker build -t $(IMAGE_PREFIX)/$(MAAS_IMAGE_COMMON)-$(RACK_SUFFIX):$(IMAGE_TAG) -f $(RACK_IMG_DIR)/Dockerfile $(RACK_IMG_DIR) --build-arg http_proxy=$(PROXY) --build-arg https_proxy=$(PROXY)
|
docker build -t $(IMAGE_PREFIX)/$(IMAGE_SUFFIX):$(IMAGE_TAG) -f $(IMAGE_DIR)/Dockerfile $(IMAGE_DIR) --build-arg http_proxy=$(PROXY) --build-arg https_proxy=$(PROXY)
|
||||||
else
|
else
|
||||||
docker build -t $(IMAGE_PREFIX)/$(MAAS_IMAGE_COMMON)-$(RACK_SUFFIX):$(IMAGE_TAG) -f $(RACK_IMG_DIR)/Dockerfile $(RACK_IMG_DIR)
|
docker build -t $(IMAGE_PREFIX)/$(IMAGE_SUFFIX):$(IMAGE_TAG) -f $(IMAGE_DIR)/Dockerfile $(IMAGE_DIR)
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: build_maas-region-controller
|
|
||||||
build_maas-region-controller:
|
|
||||||
ifeq ($(USE_PROXY), true)
|
|
||||||
docker build -t $(IMAGE_PREFIX)/$(MAAS_IMAGE_COMMON)-$(REGION_SUFFIX):$(IMAGE_TAG) -f $(REGION_IMG_DIR)/Dockerfile $(REGION_IMG_DIR) --build-arg http_proxy=$(PROXY) --build-arg https_proxy=$(PROXY)
|
|
||||||
else
|
|
||||||
docker build -t $(IMAGE_PREFIX)/$(MAAS_IMAGE_COMMON)-$(REGION_SUFFIX):$(IMAGE_TAG) -f $(REGION_IMG_DIR)/Dockerfile $(REGION_IMG_DIR)
|
|
||||||
endif
|
|
||||||
|
|
||||||
.PHONY: build_sstream-cache
|
|
||||||
build_sstream-cache:
|
|
||||||
ifeq ($(USE_PROXY), true)
|
|
||||||
docker build -t $(IMAGE_PREFIX)/$(MAAS_IMAGE_COMMON)-$(CACHE_SUFFIX):$(IMAGE_TAG) -f $(CACHE_IMG_DIR)/Dockerfile $(CACHE_IMG_DIR) --build-arg http_proxy=$(PROXY) --build-arg https_proxy=$(PROXY)
|
|
||||||
else
|
|
||||||
docker build -t $(IMAGE_PREFIX)/$(MAAS_IMAGE_COMMON)-$(CACHE_SUFFIX):$(IMAGE_TAG) -f $(CACHE_IMG_DIR)/Dockerfile $(CACHE_IMG_DIR)
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
Loading…
Reference in New Issue