Skip to content

Commit

Permalink
fix: ci failure when specifying container registration address (#424)
Browse files Browse the repository at this point in the history
Signed-off-by: YuLuo <yuluo08290126@gmail.com>
  • Loading branch information
yuluo-yx authored May 9, 2024
1 parent 9f400bb commit c2fcf50
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 3 additions & 1 deletion tools/make/env.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
HELM_VERSION ?= v0.0.3

# Docker repo
REGISTRY ?= docker.io/linuxsuren
REGISTRY ?= docker.io

REGISTRY_NAMESPACE ?= linuxsuren

# Set image tools
IMAGE_TOOL ?= docker
Expand Down
2 changes: 1 addition & 1 deletion tools/make/helm.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
include tools/make/env.mk


OCI_REGISTRY ?= oci://${REGISTRY}
OCI_REGISTRY ?= oci://${REGISTRY}/${REGISTRY_NAMESPACE}
CHART_NAME ?= api-testing
CHART_VERSION ?= ${HELM_VERSION}

Expand Down
5 changes: 3 additions & 2 deletions tools/make/image.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ include tools/make/env.mk
IMAGES_DIR ?= $(wildcard ${ROOT_DIR}tools/docker/*)
# Determine images names by stripping out the dir names
IMAGES ?= api-testing
IMAGE_NAME ?= ${REGISTRY}/${REGISTRY_NAMESPACE}/${IMAGES}:${TAG}

ifeq (${IMAGES},)
$(error Could not determine IMAGES, set ROOT_DIR or run in source dir)
Expand All @@ -24,14 +25,14 @@ image.build.%:
@$(LOG_TARGET)
@$(call log, "Building image $(GOOS)-$(GOARCH) $(IMAGES):$(TAG)")
${IMAGE_TOOL} build -f $(ROOT_DIR)/Dockerfile \
-t ${REGISTRY}/${IMAGES}:${TAG} . \
-t ${IMAGE_NAME} . \
--build-arg GOPROXY=${GOPROXY} \
--build-arg VERSION=$(TAG)

.PHONY: run.image
run.image:
@$(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

Expand Down

0 comments on commit c2fcf50

Please sign in to comment.