diff --git a/Makefile b/Makefile index 3a17261..b5c5295 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,7 @@ ############################################################################### include config.env +include source-branch.env # RELEASE shows what release of the container code has been built RELEASE ?= @@ -115,6 +116,11 @@ else ifeq "$(ARCH)" "s390x" MQ_ARCHIVE_ARCH=S390X endif +# If this is a fake master build, push images to alternative location (pipeline wont consider these images GA candidates) +ifeq ($(shell [ "$(TRAVIS)" = "true" ] && [ -n "$(MAIN_BRANCH)" ] && [ -n "$(SOURCE_BRANCH)" ] && [ "$(MAIN_BRANCH)" != "$(SOURCE_BRANCH)" ] && echo "true"), true) + MQ_DELIVERY_REGISTRY_NAMESPACE="master-fake" +endif + # LTS_TAG is the tag modifier for an LTS container build LTS_TAG= ifeq "$(LTS)" "true" @@ -462,6 +468,9 @@ pull-mq-archive-dev: .PHONY: push-advancedserver push-advancedserver: + @if [ $(MQ_DELIVERY_REGISTRY_NAMESPACE) = "master-fake" ]; then\ + echo "Detected fake master build. Note that the push destination is set to the fake master namespace: $(MQ_DELIVERY_REGISTRY_FULL_PATH)";\ + fi $(info $(SPACER)$(shell printf $(TITLE)"Push production image to $(MQ_DELIVERY_REGISTRY_FULL_PATH)"$(END))) $(COMMAND) login $(MQ_DELIVERY_REGISTRY_HOSTNAME) -u $(MQ_DELIVERY_REGISTRY_USER) -p $(MQ_DELIVERY_REGISTRY_CREDENTIAL) $(COMMAND) tag $(MQ_IMAGE_ADVANCEDSERVER)\:$(MQ_TAG) $(MQ_DELIVERY_REGISTRY_FULL_PATH)/$(MQ_IMAGE_FULL_RELEASE_NAME) @@ -469,6 +478,9 @@ push-advancedserver: .PHONY: push-devserver push-devserver: + @if [ $(MQ_DELIVERY_REGISTRY_NAMESPACE) = "master-fake" ]; then\ + echo "Detected fake master build. Note that the push destination is set to the fake master namespace: $(MQ_DELIVERY_REGISTRY_FULL_PATH)";\ + fi $(info $(SPACER)$(shell printf $(TITLE)"Push developer image to $(MQ_DELIVERY_REGISTRY_FULL_PATH)"$(END))) $(COMMAND) login $(MQ_DELIVERY_REGISTRY_HOSTNAME) -u $(MQ_DELIVERY_REGISTRY_USER) -p $(MQ_DELIVERY_REGISTRY_CREDENTIAL) $(COMMAND) tag $(MQ_IMAGE_DEVSERVER)\:$(MQ_TAG) $(MQ_DELIVERY_REGISTRY_FULL_PATH)/$(MQ_IMAGE_DEV_FULL_RELEASE_NAME) diff --git a/source-branch.env b/source-branch.env new file mode 100644 index 0000000..4d3494e --- /dev/null +++ b/source-branch.env @@ -0,0 +1,7 @@ +########################################################################################################################################################### + +# SOURCE_BRANCH is the repository branch name for this release stream. +# It should be updated when a new release fork is created but not for testing of personal builds or pre-fork updates. +SOURCE_BRANCH ?= v9.3.0.x + +###########################################################################################################################################################