Merge pull request #251 from mq-cloudpak/sjh-fake-master-pushing
Push fake master builds to different namespace
This commit is contained in:
14
Makefile
14
Makefile
@@ -18,6 +18,7 @@
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
include config.env
|
include config.env
|
||||||
|
include source-branch.env
|
||||||
|
|
||||||
# RELEASE shows what release of the container code has been built
|
# RELEASE shows what release of the container code has been built
|
||||||
RELEASE ?=
|
RELEASE ?=
|
||||||
@@ -115,6 +116,13 @@ else ifeq "$(ARCH)" "s390x"
|
|||||||
MQ_ARCHIVE_ARCH=S390X
|
MQ_ARCHIVE_ARCH=S390X
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# If this is a fake master build, push images to alternative location (pipeline wont consider these images GA candidates)
|
||||||
|
ifeq "$(TRAVIS)" "true"
|
||||||
|
ifneq "$(MAIN_BRANCH)" "$(SOURCE_BRANCH)"
|
||||||
|
MQ_DELIVERY_REGISTRY_NAMESPACE="master-fake"
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# LTS_TAG is the tag modifier for an LTS container build
|
# LTS_TAG is the tag modifier for an LTS container build
|
||||||
LTS_TAG=
|
LTS_TAG=
|
||||||
ifeq "$(LTS)" "true"
|
ifeq "$(LTS)" "true"
|
||||||
@@ -462,6 +470,9 @@ pull-mq-archive-dev:
|
|||||||
|
|
||||||
.PHONY: push-advancedserver
|
.PHONY: push-advancedserver
|
||||||
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)))
|
$(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) 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)
|
$(COMMAND) tag $(MQ_IMAGE_ADVANCEDSERVER)\:$(MQ_TAG) $(MQ_DELIVERY_REGISTRY_FULL_PATH)/$(MQ_IMAGE_FULL_RELEASE_NAME)
|
||||||
@@ -469,6 +480,9 @@ push-advancedserver:
|
|||||||
|
|
||||||
.PHONY: push-devserver
|
.PHONY: push-devserver
|
||||||
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)))
|
$(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) 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)
|
$(COMMAND) tag $(MQ_IMAGE_DEVSERVER)\:$(MQ_TAG) $(MQ_DELIVERY_REGISTRY_FULL_PATH)/$(MQ_IMAGE_DEV_FULL_RELEASE_NAME)
|
||||||
|
|||||||
7
source-branch.env
Normal file
7
source-branch.env
Normal file
@@ -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 ?= 'private-master'
|
||||||
|
|
||||||
|
###########################################################################################################################################################
|
||||||
Reference in New Issue
Block a user