Skip to content

Commit 71f3f7f

Browse files
authored
Merge pull request #226 from joelsmith/kedamain
Update relprep.sh to use correct k8s version for tests
2 parents 8e529c6 + d50591d commit 71f3f7f

File tree

7 files changed

+15
-79
lines changed

7 files changed

+15
-79
lines changed

.github/workflows/main-build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup Go
2525
uses: actions/setup-go@v4
2626
with:
27-
go-version: '1.21'
27+
go-version: '1.22'
2828

2929
- name: Go modules cache
3030
uses: actions/cache@v3
@@ -73,7 +73,7 @@ jobs:
7373
- name: Setup Go
7474
uses: actions/setup-go@v4
7575
with:
76-
go-version: '1.21'
76+
go-version: '1.22'
7777

7878
- name: Login to GitHub Container Registry
7979
uses: docker/login-action@v2
@@ -138,7 +138,7 @@ jobs:
138138
- name: Setup Go
139139
uses: actions/setup-go@v4
140140
with:
141-
go-version: '1.21'
141+
go-version: '1.22'
142142

143143
- name: Go modules cache
144144
uses: actions/cache@v3

.github/workflows/nightly-tests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Setup Go
1212
uses: actions/setup-go@v4
1313
with:
14-
go-version: '1.21'
14+
go-version: '1.22'
1515

1616
- name: Check out code
1717
uses: actions/checkout@v3

.github/workflows/pr-tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- name: Setup Go
1010
uses: actions/setup-go@v4
1111
with:
12-
go-version: '1.21'
12+
go-version: '1.22'
1313

1414
- name: Check out code
1515
uses: actions/checkout@v3
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions/setup-python@v4
3333
- uses: actions/setup-go@v4
3434
with:
35-
go-version: '1.21'
35+
go-version: '1.22'
3636
- name: Get golangci
3737
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.56.2
3838
- uses: pre-commit/[email protected]

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ GOBIN=$(shell go env GOBIN)
2727
endif
2828

2929
# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
30-
ENVTEST_K8S_VERSION = 1.26
30+
ENVTEST_K8S_VERSION = 1.29
3131

3232
# Setting SHELL to bash allows bash commands to be executed by recipes.
3333
# This is a requirement for 'setup-envtest.sh' in the test target.

go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ require (
8484
golang.org/x/time v0.5.0 // indirect
8585
golang.org/x/tools v0.22.0 // indirect
8686
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
87-
google.golang.org/appengine v1.6.8 // indirect
8887
google.golang.org/protobuf v1.34.1 // indirect
8988
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
9089
gopkg.in/inf.v0 v0.9.1 // indirect

go.sum

+3-69
Large diffs are not rendered by default.

hack/relprep.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ sed -i "s/^go *[1-9][0-9]*\.[0-9][0-9]*$/go $gover/" go.mod
3636
echo "Updatign go version in github workflows"
3737
while read f; do
3838
echo " $f"
39-
sed -i "s/^\\( *go-version: \\) *'?[1-9][0-9]*\\.[0-9][0-9]*'?\$/\\1'${gover}'/" "$f"
40-
done < <(git grep -Pl "^ *go-version: *'?[1-9][0-9]*\\.[0-9][0-9]*'?\$" .github/workflows/)
39+
sed -i "s/^\\( *go-version: \\) *'[1-9][0-9]*\\.[0-9][0-9]*'\$/\\1'${gover}'/" "$f"
40+
done < <(git grep -Pl "^ *go-version: *'[1-9][0-9]*\\.[0-9][0-9]*'\$" .github/workflows/)
4141

4242
echo
4343
echo 'Running go mod tidy (pass 1)'
@@ -142,6 +142,9 @@ if ! diff -u <(grep -vE "$ignorefields" < $bcsv) <(grep -vE "$ignorefields" < $m
142142
exit 1
143143
fi
144144

145+
echo "Updating K8s version for envtest components"
146+
sed -i "s#ENVTEST_K8S_VERSION *= *[0-9.]*#ENVTEST_K8S_VERSION = 1.${k8sver/v[0-9]./}#" Makefile
147+
145148
echo Validating bundle
146149
operator-sdk bundle validate ./keda/${ver}
147150
echo

0 commit comments

Comments
 (0)