File tree Expand file tree Collapse file tree 6 files changed +15
-14
lines changed
Expand file tree Collapse file tree 6 files changed +15
-14
lines changed Original file line number Diff line number Diff line change 1111 - main
1212
1313env :
14- GO_VERSION : ' 1.21 '
14+ GO_VERSION : ' 1.25 '
1515 REGISTRY : docker.io/supporttools
1616
1717jobs :
4141 runs-on : ubuntu-latest
4242 strategy :
4343 matrix :
44- go-version : ['1.21 ', '1.22 ']
44+ go-version : ['1.24 ', '1.25 ']
4545 steps :
4646 - name : Checkout code
4747 uses : actions/checkout@v4
7474 fi
7575
7676 - name : Upload coverage to Codecov
77- if : matrix.go-version == '1.22 '
77+ if : matrix.go-version == '1.25 '
7878 uses : codecov/codecov-action@v4
7979 with :
8080 files : ./coverage.out,./coverage-integration.out
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ permissions:
1111 id-token : write
1212
1313env :
14- GO_VERSION : " 1.21 "
14+ GO_VERSION : " 1.25 "
1515 REGISTRY : docker.io
1616 IMAGE_NAME : supporttools/node-doctor
1717
Original file line number Diff line number Diff line change 22# Optimized multi-stage build for minimal production image (<50MB target)
33
44# Build stage
5- FROM golang:1.21 -alpine AS builder
5+ FROM golang:1.25 -alpine AS builder
66
77# Install build dependencies (git for go mod download)
88RUN apk add --no-cache git
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ REGISTRY := docker.io/supporttools
3939VERSION := $(shell date +% s)
4040GIT_COMMIT := $(shell git rev-parse HEAD)
4141BUILD_TIME := $(shell date -u +"% Y-% m-% dT% H:% M:% SZ")
42- GO_VERSION := 1.21
42+ GO_VERSION := 1.25
4343
4444# RC Version - for release candidate builds
4545RC_VERSION_FILE := .version-rc
Original file line number Diff line number Diff line change 11module github.com/supporttools/node-doctor
22
3- go 1.21
3+ go 1.25.3
44
55require (
66 github.com/fsnotify/fsnotify v1.7.0
77 github.com/prometheus/client_golang v1.17.0
88 github.com/prometheus/client_model v0.4.1-0.20230718164431-9a2bf3000d16
9- github.com/stretchr/testify v1.8.2
109 golang.org/x/net v0.13.0
10+ gopkg.in/yaml.v2 v2.4.0
1111 gopkg.in/yaml.v3 v3.0.1
1212 k8s.io/api v0.28.0
1313 k8s.io/apimachinery v0.28.0
@@ -39,7 +39,6 @@ require (
3939 github.com/modern-go/reflect2 v1.0.2 // indirect
4040 github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
4141 github.com/pkg/errors v0.9.1 // indirect
42- github.com/pmezard/go-difflib v1.0.0 // indirect
4342 github.com/prometheus/common v0.44.0 // indirect
4443 github.com/prometheus/procfs v0.11.1 // indirect
4544 github.com/spf13/pflag v1.0.5 // indirect
@@ -51,7 +50,6 @@ require (
5150 google.golang.org/appengine v1.6.7 // indirect
5251 google.golang.org/protobuf v1.31.0 // indirect
5352 gopkg.in/inf.v0 v0.9.1 // indirect
54- gopkg.in/yaml.v2 v2.4.0 // indirect
5553 k8s.io/klog/v2 v2.100.1 // indirect
5654 k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
5755 k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
Original file line number Diff line number Diff line change 55
66set -e
77
8- REQUIRED_GO_VERSION=" 1.21 "
8+ REQUIRED_GO_VERSION=" 1.25 "
99ERRORS=0
1010
1111echo " Checking Go version in all go.mod files..."
@@ -21,9 +21,12 @@ while IFS= read -r mod_file; do
2121 continue
2222 fi
2323
24- # Compare versions
25- if [ " $go_version " != " $REQUIRED_GO_VERSION " ] && [ " $go_version " != " ${REQUIRED_GO_VERSION} .0" ]; then
26- echo " ERROR: $mod_file has Go version $go_version , expected $REQUIRED_GO_VERSION "
24+ # Compare versions - allow patch versions (e.g., 1.25.3 matches 1.25)
25+ # Extract major.minor from the go.mod version
26+ go_version_minor=$( echo " $go_version " | grep -oE " ^[0-9]+\.[0-9]+" )
27+
28+ if [ " $go_version_minor " != " $REQUIRED_GO_VERSION " ]; then
29+ echo " ERROR: $mod_file has Go version $go_version , expected $REQUIRED_GO_VERSION or $REQUIRED_GO_VERSION .x"
2730 ERRORS=$(( ERRORS + 1 ))
2831 else
2932 echo " ✓ $mod_file : Go $go_version "
You can’t perform that action at this time.
0 commit comments