Skip to content

Commit 191e3ff

Browse files
committed
Make sure the console uses any registry overrides
Previously when building the console it would point to the patterns-operator-console:v1.2.3 image without the registry and the deployment would fail. Now we add the version to the CONSOLE_PLUGIN_IMAGE_BASE variable and use that when building the console-* targets. CONSOLE_PLUGIN_IMAGE is envsubsted in the console deployment yaml and needs to container the registry (which can be overridden with the UPLOADREGISTRY variable)
1 parent 4f91fc4 commit 191e3ff

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

Makefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ OPERATOR_IMG ?= $(OPERATOR_NAME)-operator:$(VERSION)
7474

7575
# always release the console with the same tag as the operator and the other way around!
7676
# Image base URL of the console plugin
77-
CONSOLE_PLUGIN_IMAGE_BASE ?= $(OPERATOR_NAME)-operator-console
78-
export CONSOLE_PLUGIN_IMAGE ?= $(CONSOLE_PLUGIN_IMAGE_BASE):$(VERSION)
77+
CONSOLE_PLUGIN_IMAGE_BASE ?= $(OPERATOR_NAME)-operator-console:$(VERSION)
78+
export CONSOLE_PLUGIN_IMAGE ?= $(UPLOADREGISTRY)/$(CONSOLE_PLUGIN_IMAGE_BASE)
7979
CONSOLE_PLUGIN_DOCKERFILE ?= console-plugin.Dockerfile
8080

8181
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
@@ -409,25 +409,25 @@ generate-dockerfile-console-plugin:
409409
.PHONY: console-multiarch-manifest
410410
console-multiarch-manifest: ## creates the buildah manifest for multi-arch images
411411
# The rm is needed due to bug https://www.github.com/containers/podman/issues/19757
412-
buildah manifest rm "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE}" || /bin/true
413-
buildah manifest create "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE}"
412+
buildah manifest rm "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE_BASE}" || /bin/true
413+
buildah manifest create "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE_BASE}"
414414

415415
.PHONY: console-build-amd64
416416
console-build-amd64: generate-dockerfile-console-plugin console-multiarch-manifest ## build the console in amd64
417417
@echo "Building the console amd64"
418-
buildah build --platform linux/amd64 --format docker -f $(CONSOLE_PLUGIN_DOCKERFILE) -t "${CONSOLE_PLUGIN_IMAGE}-amd64"
419-
buildah manifest add --arch=amd64 "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE}" "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE}-amd64"
418+
buildah build --platform linux/amd64 --format docker -f $(CONSOLE_PLUGIN_DOCKERFILE) -t "${CONSOLE_PLUGIN_IMAGE_BASE}-amd64"
419+
buildah manifest add --arch=amd64 "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE_BASE}" "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE_BASE}-amd64"
420420

421421
.PHONY: console-build-arm64
422422
console-build-arm64: generate-dockerfile-console-plugin console-multiarch-manifest ## build the console in amd64
423423
@echo "Building the console arm64"
424-
buildah build --platform linux/arm64 --format docker -f $(CONSOLE_PLUGIN_DOCKERFILE) -t "${CONSOLE_PLUGIN_IMAGE}-arm64"
425-
buildah manifest add --arch=arm64 "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE}" "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE}-arm64"
424+
buildah build --platform linux/arm64 --format docker -f $(CONSOLE_PLUGIN_DOCKERFILE) -t "${CONSOLE_PLUGIN_IMAGE_BASE}-arm64"
425+
buildah manifest add --arch=arm64 "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE_BASE}" "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE_BASE}-arm64"
426426

427427
.PHONY: console-push
428428
console-push: ## Uploads the container to quay.io/validatedpatterns/${CONSOLE_PLUGIN_IMAGE}
429-
@echo "Uploading the ${REGISTRY}/${CONSOLE_PLUGIN_IMAGE} container to ${UPLOADREGISTRY}/${CONSOLE_PLUGIN_IMAGE}"
430-
buildah manifest push --all "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE}" "docker://${UPLOADREGISTRY}/${CONSOLE_PLUGIN_IMAGE}"
429+
@echo "Uploading the ${REGISTRY}/${CONSOLE_PLUGIN_IMAGE_BASE} container to ${UPLOADREGISTRY}/${CONSOLE_PLUGIN_IMAGE_BASE}"
430+
buildah manifest push --all "${REGISTRY}/${CONSOLE_PLUGIN_IMAGE_BASE}" "docker://${UPLOADREGISTRY}/${CONSOLE_PLUGIN_IMAGE_BASE}"
431431

432432
.PHONY: console-integration-tests
433433
console-integration-tests: ## Run console integration tests (requires running cluster)

0 commit comments

Comments
 (0)