Skip to content

Commit

Permalink
Merge pull request #483 from furkatgofurov7/remove-unneccesary-archs
Browse files Browse the repository at this point in the history
feat: Improvements to make image buildings faster
  • Loading branch information
furkatgofurov7 authored Oct 25, 2024
2 parents fda4dd3 + e200841 commit c168294
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/go:1": {
"version": "1.21"
"version": "1.22"
},
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/mpriscella/features/kind:1": {},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
check-latest: true
cache: true
- name: Verify
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x
- name: Build e2e image
run: make e2e-image
- uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: 1.21.x
go-version: 1.22.x
- name: Setup kind
uses: helm/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.8
go-version: 1.22.8
- name: golangci-lint
uses: golangci/[email protected]
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.21.8
go-version: 1.22.8
- name: Lint
run: make lint
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: setupGo
uses: actions/setup-go@v5
with:
go-version: '=1.21.8'
go-version: '=1.22.8'
- name: Docker login ghcr.io
uses: docker/login-action@v3
with:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
- name: setupGo
uses: actions/setup-go@v5
with:
go-version: '=1.21.8'
go-version: '=1.22.8'
- name: Update manifests
run: |
make release RELEASE_TAG=${{ env.TAG }} REGISTRY=${{ env.GHCR_REGISTRY }}
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Options for analysis running.
run:
go: "1.21"
go: "1.22"
skip-files:
- "zz_generated.*\\.go$"
- "conversion\\.go"
Expand Down
9 changes: 0 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ ARG goproxy=https://proxy.golang.org
# Run this with docker build --build-arg package=./controlplane or --build-arg package=./bootstrap
ENV GOPROXY=$goproxy

# Copy the Go Modules manifests
COPY go.mod go.mod
COPY go.sum go.sum

# Cache deps before building and copying source so that we don't need to re-download as much
# and so that source changes don't invalidate our downloaded layer
RUN --mount=type=cache,target=/go/pkg/mod \
go mod download

# Copy the sources
COPY ./ ./

Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SHELL = /usr/bin/env bash -o pipefail
#
# Go.
#
GO_VERSION ?= 1.22.0
GO_VERSION ?= 1.22.8
GO_CONTAINER_IMAGE ?= docker.io/library/golang:$(GO_VERSION)

# Use GOPROXY environment variable if set
Expand Down Expand Up @@ -113,8 +113,8 @@ GH := $(abspath $(TOOLS_BIN_DIR)/$(GH_BIN))
# Registry / images
TAG ?= dev
ARCH ?= $(shell go env GOARCH)
ALL_ARCH = amd64 arm arm64 ppc64le s390x
TARGET_PLATFORMS := linux/amd64,linux/arm64,linux/arm,linux/ppc64le,linux/s390x
ALL_ARCH = amd64 arm64
TARGET_PLATFORMS := linux/amd64,linux/arm64
MACHINE := cluster-api-provider-rke2
REGISTRY ?= ghcr.io
ORG ?= rancher
Expand Down
4 changes: 0 additions & 4 deletions examples/docker/air-gapped/image-building/files/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,6 @@ setup_arch() {
ARCH=amd64
SUFFIX=$(uname -s | tr '[:upper:]' '[:lower:]')-${ARCH}
;;
s390x)
ARCH=s390x
SUFFIX=$(uname -s | tr '[:upper:]' '[:lower:]')-${ARCH}
;;
*)
fatal "unsupported architecture ${ARCH}"
;;
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 github.com/rancher/cluster-api-provider-rke2

go 1.21
go 1.22

require (
github.com/blang/semver/v4 v4.0.0
Expand Down
2 changes: 1 addition & 1 deletion hack/tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/rancher/cluster-api-provider-rke2/hack/tools

go 1.22.6
go 1.22.8

require sigs.k8s.io/cluster-api/hack/tools v0.0.0-20240820112706-3abe3058a6a8

Expand Down

0 comments on commit c168294

Please sign in to comment.