Skip to content

Commit 91e4b59

Browse files
authored
Merge pull request #3874 from cpanato/add-GO_VERSION_TOOLING
add GO_VERSION_TOOLING to be able to build the release tooling with another go version
2 parents f446954 + 987773f commit 91e4b59

File tree

5 files changed

+77
-24
lines changed

5 files changed

+77
-24
lines changed

dependencies.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,47 @@ dependencies:
391391
- path: images/releng/k8s-ci-builder/variants.yaml
392392
match: \d+.\d+(alpha|beta|rc)?\.?(\d+)?
393393

394+
# k8s-ci-builder
395+
- name: "golang: releng tooling for k8s-ci-builder (master)"
396+
version: 1.23.4
397+
refPaths:
398+
- path: images/releng/k8s-ci-builder/Makefile
399+
match: GO_VERSION_TOOLING\ \?=\ \d+.\d+(alpha|beta|rc)?\.?(\d+)?
400+
- path: images/releng/k8s-ci-builder/variants.yaml
401+
match: "GO_VERSION_TOOLING: '\\d+.\\d+(alpha|beta|rc)?\\.?(\\d+)?'"
402+
403+
- name: "golang: releng tooling for k8s-ci-builder (previous release branches: 1.32)"
404+
version: 1.23.4
405+
refPaths:
406+
- path: images/releng/k8s-ci-builder/Makefile
407+
match: GO_VERSION_TOOLING\ \?=\ \d+.\d+(alpha|beta|rc)?\.?(\d+)?
408+
- path: images/releng/k8s-ci-builder/variants.yaml
409+
match: "GO_VERSION_TOOLING: '\\d+.\\d+(alpha|beta|rc)?\\.?(\\d+)?'"
410+
411+
- name: "golang: releng tooling for k8s-ci-builder (previous release branches: 1.31)"
412+
version: 1.23.4
413+
refPaths:
414+
- path: images/releng/k8s-ci-builder/Makefile
415+
match: GO_VERSION_TOOLING\ \?=\ \d+.\d+(alpha|beta|rc)?\.?(\d+)?
416+
- path: images/releng/k8s-ci-builder/variants.yaml
417+
match: "GO_VERSION_TOOLING: '\\d+.\\d+(alpha|beta|rc)?\\.?(\\d+)?'"
418+
419+
- name: "golang: releng tooling for k8s-ci-builder (previous release branches: 1.30)"
420+
version: 1.23.4
421+
refPaths:
422+
- path: images/releng/k8s-ci-builder/Makefile
423+
match: GO_VERSION_TOOLING\ \?=\ \d+.\d+(alpha|beta|rc)?\.?(\d+)?
424+
- path: images/releng/k8s-ci-builder/variants.yaml
425+
match: "GO_VERSION_TOOLING: '\\d+.\\d+(alpha|beta|rc)?\\.?(\\d+)?'"
426+
427+
- name: "golang: releng tooling for k8s-ci-builder (previous release branches: 1.29)"
428+
version: 1.23.4
429+
refPaths:
430+
- path: images/releng/k8s-ci-builder/Makefile
431+
match: GO_VERSION_TOOLING\ \?=\ \d+.\d+(alpha|beta|rc)?\.?(\d+)?
432+
- path: images/releng/k8s-ci-builder/variants.yaml
433+
match: "GO_VERSION_TOOLING: '\\d+.\\d+(alpha|beta|rc)?\\.?(\\d+)?'"
434+
394435
# golangci-lint-version
395436
- name: "golangci-lint"
396437
version: v1.62

images/releng/k8s-ci-builder/Dockerfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
ARG GO_VERSION
15+
ARG GO_VERSION_TOOLING
1616
ARG OS_CODENAME
1717

18-
# The Golang version for the builder image should always be explicitly set to
19-
# the Golang version of the kubernetes/kubernetes active development branch
20-
FROM golang:${GO_VERSION}-${OS_CODENAME} AS builder
18+
# The Release Tooling can be compiled with a different version of Go than the
19+
# the Go version used in the kubernetes/kubernetes active development branch.
20+
FROM golang:${GO_VERSION_TOOLING}-${OS_CODENAME} AS builder
2121

2222
WORKDIR /go/src/k8s.io/release
2323

@@ -33,7 +33,8 @@ FROM debian:${OS_CODENAME}
3333
# arg that specifies the image name (for debugging)
3434
ARG IMAGE_ARG
3535

36-
# arg that specifies the go version to install
36+
# The Golang version for the builder image should always be explicitly set to
37+
# the Golang version of the kubernetes/kubernetes active development branch
3738
ARG GO_VERSION
3839

3940
# arg that specifies docker-buildx version to install

images/releng/k8s-ci-builder/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ TAG ?= $(shell git describe --tags --always --dirty)
2525

2626
# Build args
2727
GO_VERSION ?= 1.23.3
28+
GO_VERSION_TOOLING ?= 1.23.4
2829
OS_CODENAME ?= bullseye
2930
IMAGE_ARG ?= $(IMAGE):$(TAG)-$(CONFIG)
3031

3132
BUILD_ARGS = --build-arg=GO_VERSION=$(GO_VERSION) \
33+
--build-arg=GO_VERSION_TOOLING=$(GO_VERSION_TOOLING) \
3234
--build-arg=OS_CODENAME=$(OS_CODENAME) \
3335
--build-arg=IMAGE_ARG=$(IMAGE_ARG)
3436

images/releng/k8s-ci-builder/cloudbuild.yaml

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,21 @@ steps:
1515
entrypoint: 'bash'
1616
dir: ./images/releng/k8s-ci-builder
1717
env:
18-
- DOCKER_CLI_EXPERIMENTAL=enabled
19-
- REGISTRY=$_REGISTRY
20-
- IMAGE_ARG='$_REGISTRY/k8s-ci-builder:${_GIT_TAG}-${_CONFIG}'
21-
- HOME=/root
22-
- TAG=${_GIT_TAG}
23-
- PULL_BASE_REF=${_PULL_BASE_REF}
24-
- CONFIG=${_CONFIG}
25-
- GO_VERSION=${_GO_VERSION}
26-
- OS_CODENAME=${_OS_CODENAME}
18+
- DOCKER_CLI_EXPERIMENTAL=enabled
19+
- REGISTRY=$_REGISTRY
20+
- IMAGE_ARG='$_REGISTRY/k8s-ci-builder:${_GIT_TAG}-${_CONFIG}'
21+
- HOME=/root
22+
- TAG=${_GIT_TAG}
23+
- PULL_BASE_REF=${_PULL_BASE_REF}
24+
- CONFIG=${_CONFIG}
25+
- GO_VERSION=${_GO_VERSION}
26+
- GO_VERSION_TOOLING=${_GO_VERSION_TOOLING}
27+
- OS_CODENAME=${_OS_CODENAME}
2728
args:
28-
- '-c'
29-
- |
30-
gcloud auth configure-docker \
31-
&& make push
29+
- '-c'
30+
- |
31+
gcloud auth configure-docker \
32+
&& make push
3233
3334
substitutions:
3435
# _GIT_TAG will be filled with a git-based tag for the image, of the form vYYYYMMDD-hash, and
@@ -37,16 +38,18 @@ substitutions:
3738
_PULL_BASE_REF: 'dev'
3839
_CONFIG: 'config'
3940
_GO_VERSION: '0.0.0'
41+
_GO_VERSION_TOOLING: '0.0.0'
4042
_OS_CODENAME: 'codename'
4143
_REGISTRY: 'fake.repository/registry-name'
4244

4345
tags:
44-
- 'k8s-ci-builder'
45-
- ${_GIT_TAG}
46-
- ${_PULL_BASE_REF}
47-
- ${_CONFIG}
48-
- ${_GO_VERSION}
49-
- ${_OS_CODENAME}
46+
- 'k8s-ci-builder'
47+
- ${_GIT_TAG}
48+
- ${_PULL_BASE_REF}
49+
- ${_CONFIG}
50+
- ${_GO_VERSION}
51+
- ${_GO_VERSION_TOOLING}
52+
- ${_OS_CODENAME}
5053

5154
images:
5255
- 'gcr.io/$PROJECT_ID/k8s-ci-builder:${_CONFIG}'

images/releng/k8s-ci-builder/variants.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,30 @@ variants:
22
default:
33
CONFIG: default
44
GO_VERSION: '1.22.9'
5+
GO_VERSION_TOOLING: '1.23.4'
56
OS_CODENAME: 'bullseye'
67
next:
78
CONFIG: next
89
GO_VERSION: '1.23.3'
10+
GO_VERSION_TOOLING: '1.23.4'
911
OS_CODENAME: 'bookworm'
1012
'1.32':
1113
CONFIG: '1.32'
1214
GO_VERSION: '1.23.3'
15+
GO_VERSION_TOOLING: '1.23.4'
1316
OS_CODENAME: 'bullseye'
1417
'1.31':
1518
CONFIG: '1.31'
1619
GO_VERSION: '1.22.9'
20+
GO_VERSION_TOOLING: '1.23.4'
1721
OS_CODENAME: 'bullseye'
1822
'1.30':
1923
CONFIG: '1.30'
2024
GO_VERSION: '1.22.9'
25+
GO_VERSION_TOOLING: '1.23.4'
2126
OS_CODENAME: 'bullseye'
2227
'1.29':
2328
CONFIG: '1.29'
2429
GO_VERSION: '1.22.9'
30+
GO_VERSION_TOOLING: '1.23.4'
2531
OS_CODENAME: 'bullseye'

0 commit comments

Comments
 (0)