|
18 | 18 | ############################################################################### |
19 | 19 |
|
20 | 20 | include config.env |
| 21 | +include source-branch.env |
21 | 22 |
|
22 | 23 | # RELEASE shows what release of the container code has been built |
23 | 24 | RELEASE ?= |
@@ -115,6 +116,13 @@ else ifeq "$(ARCH)" "s390x" |
115 | 116 | MQ_ARCHIVE_ARCH=S390X |
116 | 117 | endif |
117 | 118 |
|
| 119 | +# If this is a fake master build, push images to alternative location (pipeline wont consider these images GA candidates) |
| 120 | +ifeq "$(TRAVIS)" "true" |
| 121 | +ifneq "$(MAIN_BRANCH)" "$(SOURCE_BRANCH)" |
| 122 | + MQ_DELIVERY_REGISTRY_NAMESPACE="master-fake" |
| 123 | +endif |
| 124 | +endif |
| 125 | + |
118 | 126 | # LTS_TAG is the tag modifier for an LTS container build |
119 | 127 | LTS_TAG= |
120 | 128 | ifeq "$(LTS)" "true" |
@@ -462,13 +470,19 @@ pull-mq-archive-dev: |
462 | 470 |
|
463 | 471 | .PHONY: push-advancedserver |
464 | 472 | push-advancedserver: |
| 473 | + @if [ $(MQ_DELIVERY_REGISTRY_NAMESPACE) = "master-fake" ]; then\ |
| 474 | + echo "Detected fake master build. Note that the push destination is set to the fake master namespace: $(MQ_DELIVERY_REGISTRY_FULL_PATH)";\ |
| 475 | + fi |
465 | 476 | $(info $(SPACER)$(shell printf $(TITLE)"Push production image to $(MQ_DELIVERY_REGISTRY_FULL_PATH)"$(END))) |
466 | 477 | $(COMMAND) login $(MQ_DELIVERY_REGISTRY_HOSTNAME) -u $(MQ_DELIVERY_REGISTRY_USER) -p $(MQ_DELIVERY_REGISTRY_CREDENTIAL) |
467 | 478 | $(COMMAND) tag $(MQ_IMAGE_ADVANCEDSERVER)\:$(MQ_TAG) $(MQ_DELIVERY_REGISTRY_FULL_PATH)/$(MQ_IMAGE_FULL_RELEASE_NAME) |
468 | 479 | $(COMMAND) push $(MQ_DELIVERY_REGISTRY_FULL_PATH)/$(MQ_IMAGE_FULL_RELEASE_NAME) |
469 | 480 |
|
470 | 481 | .PHONY: push-devserver |
471 | 482 | push-devserver: |
| 483 | + @if [ $(MQ_DELIVERY_REGISTRY_NAMESPACE) = "master-fake" ]; then\ |
| 484 | + echo "Detected fake master build. Note that the push destination is set to the fake master namespace: $(MQ_DELIVERY_REGISTRY_FULL_PATH)";\ |
| 485 | + fi |
472 | 486 | $(info $(SPACER)$(shell printf $(TITLE)"Push developer image to $(MQ_DELIVERY_REGISTRY_FULL_PATH)"$(END))) |
473 | 487 | $(COMMAND) login $(MQ_DELIVERY_REGISTRY_HOSTNAME) -u $(MQ_DELIVERY_REGISTRY_USER) -p $(MQ_DELIVERY_REGISTRY_CREDENTIAL) |
474 | 488 | $(COMMAND) tag $(MQ_IMAGE_DEVSERVER)\:$(MQ_TAG) $(MQ_DELIVERY_REGISTRY_FULL_PATH)/$(MQ_IMAGE_DEV_FULL_RELEASE_NAME) |
|
0 commit comments