Skip to content

Commit

Permalink
Fix golang makefile var name
Browse files Browse the repository at this point in the history
  • Loading branch information
rikatz committed Jan 28, 2024
1 parent 59daa4c commit 59f357c
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ SHELL=/bin/bash -o pipefail -o errexit
# Use the 0.0 tag for testing, it shouldn't clobber any release builds
TAG ?= $(shell cat TAG)

GOLANG_VERSION ?= $(shell cat GOLANG_VERSION)
# The env below is called GO_VERSION and not GOLANG_VERSION because
# the gcb image we use to build already defines GOLANG_VERSION and is a
# really old version
GO_VERSION ?= $(shell cat GOLANG_VERSION)

# e2e settings
# Allow limiting the scope of the e2e tests. By default run everything
Expand Down Expand Up @@ -107,7 +110,7 @@ clean-chroot-image: ## Removes local image

.PHONY: build
build: ## Build ingress controller, debug tool and pre-stop hook.
E2E_IMAGE=golang:$(GOLANG_VERSION)-alpine3.19 USE_SHELL=/bin/sh build/run-in-docker.sh \
E2E_IMAGE=golang:$(GO_VERSION)-alpine3.19 USE_SHELL=/bin/sh build/run-in-docker.sh \
MAC_OS=$(MAC_OS) \
PKG=$(PKG) \
ARCH=$(ARCH) \
Expand Down
7 changes: 5 additions & 2 deletions images/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ INIT_BUILDX=$(DIR)/../hack/init-buildx.sh

BASE_IMAGE = $(shell cat $(DIR)/../NGINX_BASE)

GOLANG_VERSION = $(shell cat $(DIR)/../GOLANG_VERSION)
# The env below is called GO_VERSION and not GOLANG_VERSION because
# the gcb image we use to build already defines GOLANG_VERSION and is a
# really old version
GO_VERSION = $(shell cat $(DIR)/../GOLANG_VERSION)

REGISTRY ?= local
NAME ?=
Expand Down Expand Up @@ -54,7 +57,7 @@ build: precheck ensure-buildx
--label=org.opencontainers.image.licenses=Apache-2.0 \
--label=org.opencontainers.image.description="Ingress NGINX $(NAME) image" \
--build-arg BASE_IMAGE=$(BASE_IMAGE) \
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
--build-arg GOLANG_VERSION=$(GO_VERSION) \
--platform=${PLATFORMS} $(OUTPUT) \
--progress=$(PROGRESS) \
--pull $(EXTRAARGS) \
Expand Down
9 changes: 6 additions & 3 deletions images/test-runner/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ IMAGE = $(REGISTRY)/e2e-test-runner

NGINX_BASE_IMAGE ?= $(shell cat $(DIR)/../../NGINX_BASE)

GOLANG_VERSION ?= $(shell cat $(DIR)/../../GOLANG_VERSION)
# The env below is called GO_VERSION and not GOLANG_VERSION because
# the gcb image we use to build already defines GOLANG_VERSION and is a
# really old version
GO_VERSION ?= $(shell cat $(DIR)/../../GOLANG_VERSION)

# required to enable buildx
export DOCKER_CLI_EXPERIMENTAL=enabled
Expand All @@ -45,7 +48,7 @@ image:
--pull \
--push \
--build-arg BASE_IMAGE=${NGINX_BASE_IMAGE} \
--build-arg GOLANG_VERSION=${GOLANG_VERSION} \
--build-arg GOLANG_VERSION=${GO_VERSION} \
--build-arg ETCD_VERSION=3.4.3-0 \
--build-arg K8S_RELEASE=v1.26.0 \
--build-arg RESTY_CLI_VERSION=0.27 \
Expand All @@ -66,7 +69,7 @@ build: ensure-buildx
--progress=${PROGRESS} \
--pull \
--build-arg BASE_IMAGE=${NGINX_BASE_IMAGE} \
--build-arg GOLANG_VERSION=${GOLANG_VERSION} \
--build-arg GOLANG_VERSION=${GO_VERSION} \
--build-arg ETCD_VERSION=3.4.3-0 \
--build-arg K8S_RELEASE=v1.26.0 \
--build-arg RESTY_CLI_VERSION=0.27 \
Expand Down

0 comments on commit 59f357c

Please sign in to comment.