fix: ci failure when specifying container registration address (#424)
Signed-off-by: YuLuo <yuluo08290126@gmail.com>
This commit is contained in:
parent
9f400bbcb9
commit
c2fcf50f2d
|
@ -7,7 +7,9 @@
|
||||||
HELM_VERSION ?= v0.0.3
|
HELM_VERSION ?= v0.0.3
|
||||||
|
|
||||||
# Docker repo
|
# Docker repo
|
||||||
REGISTRY ?= docker.io/linuxsuren
|
REGISTRY ?= docker.io
|
||||||
|
|
||||||
|
REGISTRY_NAMESPACE ?= linuxsuren
|
||||||
|
|
||||||
# Set image tools
|
# Set image tools
|
||||||
IMAGE_TOOL ?= docker
|
IMAGE_TOOL ?= docker
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
include tools/make/env.mk
|
include tools/make/env.mk
|
||||||
|
|
||||||
|
|
||||||
OCI_REGISTRY ?= oci://${REGISTRY}
|
OCI_REGISTRY ?= oci://${REGISTRY}/${REGISTRY_NAMESPACE}
|
||||||
CHART_NAME ?= api-testing
|
CHART_NAME ?= api-testing
|
||||||
CHART_VERSION ?= ${HELM_VERSION}
|
CHART_VERSION ?= ${HELM_VERSION}
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@ include tools/make/env.mk
|
||||||
IMAGES_DIR ?= $(wildcard ${ROOT_DIR}tools/docker/*)
|
IMAGES_DIR ?= $(wildcard ${ROOT_DIR}tools/docker/*)
|
||||||
# Determine images names by stripping out the dir names
|
# Determine images names by stripping out the dir names
|
||||||
IMAGES ?= api-testing
|
IMAGES ?= api-testing
|
||||||
|
IMAGE_NAME ?= ${REGISTRY}/${REGISTRY_NAMESPACE}/${IMAGES}:${TAG}
|
||||||
|
|
||||||
ifeq (${IMAGES},)
|
ifeq (${IMAGES},)
|
||||||
$(error Could not determine IMAGES, set ROOT_DIR or run in source dir)
|
$(error Could not determine IMAGES, set ROOT_DIR or run in source dir)
|
||||||
|
@ -24,14 +25,14 @@ image.build.%:
|
||||||
@$(LOG_TARGET)
|
@$(LOG_TARGET)
|
||||||
@$(call log, "Building image $(GOOS)-$(GOARCH) $(IMAGES):$(TAG)")
|
@$(call log, "Building image $(GOOS)-$(GOARCH) $(IMAGES):$(TAG)")
|
||||||
${IMAGE_TOOL} build -f $(ROOT_DIR)/Dockerfile \
|
${IMAGE_TOOL} build -f $(ROOT_DIR)/Dockerfile \
|
||||||
-t ${REGISTRY}/${IMAGES}:${TAG} . \
|
-t ${IMAGE_NAME} . \
|
||||||
--build-arg GOPROXY=${GOPROXY} \
|
--build-arg GOPROXY=${GOPROXY} \
|
||||||
--build-arg VERSION=$(TAG)
|
--build-arg VERSION=$(TAG)
|
||||||
|
|
||||||
.PHONY: run.image
|
.PHONY: run.image
|
||||||
run.image:
|
run.image:
|
||||||
@$(LOG_TARGET)
|
@$(LOG_TARGET)
|
||||||
${IMAGE_TOOL} run -p 7070:7070 -p 8080:8080 ${REGISTRY}/${IMAGES}:${TAG}
|
${IMAGE_TOOL} run -p 7070:7070 -p 8080:8080 ${IMAGE_NAME}
|
||||||
|
|
||||||
##@ Image
|
##@ Image
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue