Skip to content

Commit

Permalink
Merge pull request #159 from jingyuanliang/mf
Browse files Browse the repository at this point in the history
Update build infra, including bump to Go 1.23
  • Loading branch information
k8s-ci-robot authored Sep 26, 2024
2 parents 99fef04 + 37adc46 commit cbda71c
Show file tree
Hide file tree
Showing 7 changed files with 467 additions and 690 deletions.
8 changes: 0 additions & 8 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ updates:
directory: /
schedule:
interval: weekly
- package-ecosystem: gomod
directory: /tools
schedule:
interval: weekly
groups:
gomod-dependencies:
patterns:
- '*'
- package-ecosystem: gomod
directory: /
schedule:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ COPY bin/{ARG_OS}_{ARG_ARCH}/{ARG_BIN} /{ARG_BIN}

# This container has to run as root for iptables. Be explicit here.
USER 0:0
ENV HOME /
ENV HOME=/

ENTRYPOINT ["/{ARG_BIN}"]
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ ALL_PLATFORMS ?= linux/amd64 linux/arm linux/arm64 linux/ppc64le linux/s390x

# The "FROM" part of the Dockerfile. This should be a manifest-list which
# supports all of the platforms listed in ALL_PLATFORMS.
BASE_IMAGE ?= registry.k8s.io/build-image/distroless-iptables:v0.4.4
BASE_IMAGE ?= registry.k8s.io/build-image/distroless-iptables:v0.6.3

# Where to push the docker images.
REGISTRY ?= gcr.io/k8s-staging-networking
Expand All @@ -55,12 +55,12 @@ MAKEFLAGS += --warn-undefined-variables
.SUFFIXES:

# Used internally. Users should pass GOOS and/or GOARCH.
OS := $(if $(GOOS),$(GOOS),$(shell go env GOOS))
ARCH := $(if $(GOARCH),$(GOARCH),$(shell go env GOARCH))
OS := $(if $(GOOS),$(GOOS),$(shell GOTOOLCHAIN=local go env GOOS))
ARCH := $(if $(GOARCH),$(GOARCH),$(shell GOTOOLCHAIN=local go env GOARCH))

TAG := $(VERSION)__$(OS)_$(ARCH)

GO_VERSION := 1.22
GO_VERSION := 1.23
BUILD_IMAGE := golang:$(GO_VERSION)-alpine

BIN_EXTENSION :=
Expand Down Expand Up @@ -131,7 +131,8 @@ BUILD_DIRS := bin/$(OS)_$(ARCH) \
bin/tools \
.go/bin/$(OS)_$(ARCH) \
.go/bin/$(OS)_$(ARCH)/$(OS)_$(ARCH) \
.go/cache
.go/cache \
.go/pkg

# Each outbin target is just a facade for the respective stampfile target.
# This `eval` establishes the dependencies for each.
Expand Down Expand Up @@ -227,7 +228,7 @@ $(LICENSES): | $(BUILD_DIRS)
--env HTTP_PROXY="$(HTTP_PROXY)" \
--env HTTPS_PROXY="$(HTTPS_PROXY)" \
$(BUILD_IMAGE) \
go install github.com/google/go-licenses
go install github.com/google/go-licenses/v2
# The tool runs in a container because it execs `go`, which doesn't
# play nicely with CI. The tool also wants its output dir to not
# exist, so we can't just volume mount $(LICENSES).
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module k8s.io/ip-masq-agent

go 1.22
go 1.23

require (
k8s.io/apimachinery v0.29.1
Expand Down
262 changes: 136 additions & 126 deletions tools/go.mod

Large diffs are not rendered by default.

868 changes: 321 additions & 547 deletions tools/go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tools/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ package tools
import (
_ "github.com/estesp/manifest-tool/v2/cmd/manifest-tool"
_ "github.com/golangci/golangci-lint/cmd/golangci-lint"
_ "github.com/google/go-licenses"
_ "github.com/google/go-licenses/v2"
)

0 comments on commit cbda71c

Please sign in to comment.