Skip to content

Commit

Permalink
Merge pull request #226 from joelsmith/kedamain
Browse files Browse the repository at this point in the history
Update relprep.sh to use correct k8s version for tests
  • Loading branch information
joelsmith authored Jun 7, 2024
2 parents 8e529c6 + d50591d commit 71f3f7f
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 79 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.22'

- name: Go modules cache
uses: actions/cache@v3
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.22'

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
Expand Down Expand Up @@ -138,7 +138,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.22'

- name: Go modules cache
uses: actions/cache@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.22'

- name: Check out code
uses: actions/checkout@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.22'

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -32,7 +32,7 @@ jobs:
- uses: actions/setup-python@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
go-version: '1.22'
- name: Get golangci
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.56.2
- uses: pre-commit/[email protected]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ GOBIN=$(shell go env GOBIN)
endif

# ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary.
ENVTEST_K8S_VERSION = 1.26
ENVTEST_K8S_VERSION = 1.29

# Setting SHELL to bash allows bash commands to be executed by recipes.
# This is a requirement for 'setup-envtest.sh' in the test target.
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ require (
golang.org/x/time v0.5.0 // indirect
golang.org/x/tools v0.22.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.34.1 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
Expand Down
72 changes: 3 additions & 69 deletions go.sum

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions hack/relprep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ sed -i "s/^go *[1-9][0-9]*\.[0-9][0-9]*$/go $gover/" go.mod
echo "Updatign go version in github workflows"
while read f; do
echo " $f"
sed -i "s/^\\( *go-version: \\) *'?[1-9][0-9]*\\.[0-9][0-9]*'?\$/\\1'${gover}'/" "$f"
done < <(git grep -Pl "^ *go-version: *'?[1-9][0-9]*\\.[0-9][0-9]*'?\$" .github/workflows/)
sed -i "s/^\\( *go-version: \\) *'[1-9][0-9]*\\.[0-9][0-9]*'\$/\\1'${gover}'/" "$f"
done < <(git grep -Pl "^ *go-version: *'[1-9][0-9]*\\.[0-9][0-9]*'\$" .github/workflows/)

echo
echo 'Running go mod tidy (pass 1)'
Expand Down Expand Up @@ -142,6 +142,9 @@ if ! diff -u <(grep -vE "$ignorefields" < $bcsv) <(grep -vE "$ignorefields" < $m
exit 1
fi

echo "Updating K8s version for envtest components"
sed -i "s#ENVTEST_K8S_VERSION *= *[0-9.]*#ENVTEST_K8S_VERSION = 1.${k8sver/v[0-9]./}#" Makefile

echo Validating bundle
operator-sdk bundle validate ./keda/${ver}
echo
Expand Down

0 comments on commit 71f3f7f

Please sign in to comment.