Skip to content

Commit c4ad34b

Browse files
committed
fix: upgrade go and dependencies
related to jenkins-x/jx#8670
1 parent e2d45b9 commit c4ad34b

File tree

14 files changed

+317
-923
lines changed

14 files changed

+317
-923
lines changed

.golangci.yaml

+19-43
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
linters-settings:
22
depguard:
3-
list-type: blacklist
4-
packages:
5-
- github.com/jenkins-x/jx/v2/pkg/log/
6-
- github.com/satori/go.uuid
7-
- github.com/pborman/uuid
8-
packages-with-error-message:
9-
- github.com/jenkins-x/jx/v2/pkg/log/: "use jenkins-x/jx-logging instead"
10-
- github.com/satori/go.uuid: "use github.com/google/uuid instead"
11-
- github.com/pborman/uuid: "use github.com/google/uuid instead"
3+
rules:
4+
# Name of a rule.
5+
Main:
6+
list-mode: lax
7+
deny:
8+
- pkg: github.com/jenkins-x/jx/v2/pkg/log/
9+
desc: "use jenkins-x/jx-logging instead"
10+
- pkg: github.com/satori/go.uuid
11+
desc: "use github.com/google/uuid instead"
12+
- pkg: github.com/pborman/uuid
13+
desc: "use github.com/google/uuid instead"
1214
dupl:
1315
threshold: 100
1416
exhaustive:
@@ -37,17 +39,14 @@ linters-settings:
3739
gocyclo:
3840
min-complexity: 15
3941
goimports: {}
40-
golint:
41-
min-confidence: 0
42+
revive:
43+
confidence: 0
4244
gofmt:
4345
simplify: true
44-
gomnd:
45-
settings:
46-
mnd:
47-
# don't include the "operation" and "assign"
48-
checks: [argument, case, condition, return]
46+
mnd:
47+
# don't include the "operation" and "assign"
48+
checks: [argument, case, condition, return]
4949
govet:
50-
check-shadowing: true
5150
settings:
5251
printf:
5352
funcs:
@@ -58,11 +57,8 @@ linters-settings:
5857
- (github.com/jenkins-x/jx-logging/v3/pkg/log/Logger()).Fatalf
5958
lll:
6059
line-length: 140
61-
maligned:
62-
suggest-new: true
6360
misspell: {}
6461
nolintlint:
65-
allow-leading-space: true # don't require machine-readable nolint directives (i.e. with no leading space)
6662
allow-unused: false # report any unused nolint directives
6763
require-explanation: false # don't require an explanation for nolint directives
6864
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
@@ -73,7 +69,6 @@ linters:
7369
enable:
7470
- asciicheck
7571
- bodyclose
76-
- deadcode
7772
- depguard
7873
- errcheck
7974
- gofmt
@@ -86,36 +81,17 @@ linters:
8681
- nakedret
8782
- rowserrcheck
8883
- staticcheck
89-
- structcheck
9084
- typecheck
9185
- unconvert
9286
- unparam
9387
- unused
94-
- varcheck
9588
- revive
9689
- gocritic
9790
- govet
9891
issues:
99-
# Excluding configuration per-path, per-linter, per-text and per-source
100-
exclude-rules:
101-
# - path: _test\.go
102-
# linters:
103-
# - gomnd
104-
# https://github.com/go-critic/go-critic/issues/926
105-
- linters:
106-
- gocritic
107-
text: "unnecessaryDefer:"
108-
exclude:
109-
- 'shadow: declaration of "err" shadows declaration at'
110-
max-same-issues: 0
111-
92+
exclude-dirs:
93+
- cmd/docs
11294
run:
11395
timeout: 30m
114-
skip-dirs:
115-
- cmd/docs
11696
# golangci.com configuration
117-
# https://github.com/golangci/golangci/wiki/Configuration
118-
service:
119-
golangci-lint-version: 1.29.x # use the fixed version to not introduce new linters unexpectedly
120-
prepare:
121-
- echo "here I can run custom commands, but no preparation needed for this repo"
97+
# https://github.com/golangci/golangci/wiki/Configuration

.goreleaser.yml

+5-15
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,65 @@
1+
version: 2
12
env:
23
- GO111MODULE=on
34
- CGO_ENABLED=0
45
before:
56
hooks:
67
- go mod download
7-
88
builds:
99
- id: jx-verify
1010
# Path to main.go file or main package.
1111
# Default is `.`.
1212
main: ./cmd/main.go
13-
1413
# Binary name.
1514
# Can be a path (e.g. `bin/app`) to wrap the binary in a directory.
1615
# Default is the name of the project directory.
1716
binary: jx-verify
18-
1917
# Custom ldflags templates.
2018
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
2119
ldflags:
2220
- -X "{{.Env.ROOTPACKAGE}}/pkg/cmd/version.Version={{.Env.VERSION}}" -X "{{.Env.ROOTPACKAGE}}/pkg/cmd/version.Revision={{.Env.REV}}" -X "{{.Env.ROOTPACKAGE}}/pkg/cmd/version.Branch={{.Env.BRANCH}}" -X "{{.Env.ROOTPACKAGE}}/pkg/cmd/version.BuildDate={{.Env.BUILDDATE}}" -X "{{.Env.ROOTPACKAGE}}/pkg/cmd/version.GoVersion={{.Env.GOVERSION}}"
23-
2421
# GOOS list to build for.
2522
# For more info refer to: https://golang.org/doc/install/source#environment
2623
# Defaults are darwin and linux.
2724
goos:
2825
- windows
2926
- darwin
3027
- linux
31-
3228
# GOARCH to build for.
3329
# For more info refer to: https://golang.org/doc/install/source#environment
3430
# Defaults are 386 and amd64.
3531
goarch:
3632
- amd64
37-
- arm
3833
- arm64
34+
ignore:
35+
- goos: windows
36+
goarch: arm64
3937
archives:
4038
- name_template: "jx-verify-{{ .Os }}-{{ .Arch }}"
4139
format_overrides:
4240
- goos: windows
4341
format: zip
44-
4542
checksum:
4643
# You can change the name of the checksums file.
4744
# Default is `jx-verify_{{ .Version }}_checksums.txt`.
4845
name_template: "jx-verify-checksums.txt"
49-
5046
# Algorithm to be used.
5147
# Accepted options are sha256, sha512, sha1, crc32, md5, sha224 and sha384.
5248
# Default is sha256.
5349
algorithm: sha256
54-
5550
changelog:
56-
# set it to true if you wish to skip the changelog generation
57-
skip: true
58-
51+
disable: true
5952
release:
6053
# If set to true, will not auto-publish the release.
6154
# Default is false.
6255
draft: false
63-
6456
# If set to auto, will mark the release as not ready for production
6557
# in case there is an indicator for this in the tag e.g. v1.0.0-rc1
6658
# If set to true, will mark the release as not ready for production.
6759
# Default is false.
6860
prerelease: false
69-
7061
# You can change the name of the GitHub release.
7162
# Default is `{{.Tag}}`
7263
name_template: "{{.Env.VERSION}}"
73-
7464
sboms:
7565
- artifacts: archive

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ROOT_PACKAGE := github.com/$(ORG_REPO)
1717
# This does not reflect the go binary version which was used to build the jx binary, and also does not reflect the version in the catalog.
1818
# The sole purpose of this variable is to build a new binary if we ever need to build a new jx binary with a new go version with no code change.
1919
# If you notice that this version is not the same as the catalog version, please open a PR, the maintainers are happy to review it.
20-
DUMMY_GO_VERSION := 1.18.6
20+
DUMMY_GO_VERSION := 1.23.3
2121

2222
GO_VERSION := $(shell $(GO) version | sed -e 's/^[^0-9.]*\([0-9.]*\).*/\1/')
2323
GO_DEPENDENCIES := $(call rwildcard,pkg/,*.go) $(call rwildcard,cmd/,*.go)
@@ -150,7 +150,7 @@ clean: ## Clean the generated artifacts
150150
rm -rf build release dist
151151

152152
get-fmt-deps: ## Install test dependencies
153-
$(GO_NOMOD) get golang.org/x/tools/cmd/goimports
153+
$(GO_NOMOD) install golang.org/x/tools/cmd/goimports
154154

155155
.PHONY: fmt
156156
fmt: importfmt ## Format the code

go.mod

+58-60
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,88 @@
11
module github.com/jenkins-x-plugins/jx-verify
22

3-
go 1.18
3+
go 1.23.0
4+
5+
toolchain go1.23.3
46

57
require (
6-
github.com/cenkalti/backoff v2.2.1+incompatible
8+
github.com/cenkalti/backoff/v5 v5.0.1
79
github.com/cpuguy83/go-md2man v1.0.10
8-
github.com/genkiroid/cert v0.0.0-20191007122723-897560fbbe50
9-
github.com/jenkins-x/jx-api/v4 v4.7.4
10-
github.com/jenkins-x/jx-helpers/v3 v3.6.5
11-
github.com/jenkins-x/jx-kube-client/v3 v3.0.5
12-
github.com/jenkins-x/jx-logging/v3 v3.0.10
13-
github.com/pkg/errors v0.9.1
10+
github.com/genkiroid/cert v0.0.0-20230422001211-fe9a3bec009a
11+
github.com/jenkins-x/jx-api/v4 v4.7.9
12+
github.com/jenkins-x/jx-helpers/v3 v3.9.2
13+
github.com/jenkins-x/jx-kube-client/v3 v3.0.8
14+
github.com/jenkins-x/jx-logging/v3 v3.0.17
1415
github.com/sergi/go-diff v1.1.0
15-
github.com/spf13/cobra v1.2.0
16+
github.com/spf13/cobra v1.8.1
1617
github.com/spf13/pflag v1.0.5
17-
github.com/stretchr/testify v1.8.4
18-
k8s.io/api v0.23.17
19-
k8s.io/apimachinery v0.23.17
20-
k8s.io/client-go v11.0.0+incompatible
18+
github.com/stretchr/testify v1.10.0
19+
k8s.io/api v0.32.1
20+
k8s.io/apimachinery v0.32.1
21+
k8s.io/client-go v0.32.1
2122
)
2223

2324
require (
24-
cloud.google.com/go/compute v1.10.0 // indirect
25-
github.com/AlecAivazis/survey/v2 v2.3.4 // indirect
26-
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
27-
github.com/Azure/go-autorest/autorest v0.11.28 // indirect
28-
github.com/Azure/go-autorest/autorest/adal v0.9.21 // indirect
29-
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
30-
github.com/Azure/go-autorest/logger v0.2.1 // indirect
31-
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
25+
dario.cat/mergo v1.0.1 // indirect
26+
github.com/AlecAivazis/survey/v2 v2.3.7 // indirect
3227
github.com/MakeNowJust/heredoc v1.0.0 // indirect
33-
github.com/davecgh/go-spew v1.1.1 // indirect
34-
github.com/evanphx/json-patch v4.12.0+incompatible // indirect
35-
github.com/fatih/color v1.9.0 // indirect
28+
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
29+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
30+
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
31+
github.com/fatih/color v1.18.0 // indirect
32+
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
3633
github.com/ghodss/yaml v1.0.0 // indirect
37-
github.com/go-logr/logr v1.2.4 // indirect
34+
github.com/go-logr/logr v1.4.2 // indirect
35+
github.com/go-openapi/jsonpointer v0.21.0 // indirect
36+
github.com/go-openapi/jsonreference v0.21.0 // indirect
37+
github.com/go-openapi/swag v0.23.0 // indirect
3838
github.com/go-stack/stack v1.8.1 // indirect
3939
github.com/gogo/protobuf v1.3.2 // indirect
40-
github.com/golang-jwt/jwt/v4 v4.4.2 // indirect
41-
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b // indirect
42-
github.com/golang/protobuf v1.5.3 // indirect
40+
github.com/golang/glog v1.2.4 // indirect
41+
github.com/golang/protobuf v1.5.4 // indirect
42+
github.com/google/gnostic-models v0.6.9 // indirect
4343
github.com/google/go-cmp v0.6.0 // indirect
4444
github.com/google/gofuzz v1.2.0 // indirect
45-
github.com/google/uuid v1.1.4 // indirect
46-
github.com/googleapis/gnostic v0.5.5 // indirect
47-
github.com/imdario/mergo v0.3.13 // indirect
48-
github.com/inconshreveable/mousetrap v1.0.0 // indirect
49-
github.com/jenkins-x/logrus-stackdriver-formatter v0.2.4 // indirect
45+
github.com/google/uuid v1.6.0 // indirect
46+
github.com/gorilla/websocket v1.5.0 // indirect
47+
github.com/inconshreveable/mousetrap v1.1.0 // indirect
48+
github.com/jenkins-x/logrus-stackdriver-formatter v0.2.7 // indirect
49+
github.com/josharian/intern v1.0.0 // indirect
5050
github.com/json-iterator/go v1.1.12 // indirect
5151
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
52-
github.com/mattn/go-colorable v0.1.12 // indirect
53-
github.com/mattn/go-isatty v0.0.14 // indirect
52+
github.com/mailru/easyjson v0.9.0 // indirect
53+
github.com/mattn/go-colorable v0.1.14 // indirect
54+
github.com/mattn/go-isatty v0.0.20 // indirect
5455
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
55-
github.com/moby/spdystream v0.2.0 // indirect
56+
github.com/moby/spdystream v0.5.0 // indirect
5657
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
5758
github.com/modern-go/reflect2 v1.0.2 // indirect
58-
github.com/pmezard/go-difflib v1.0.0 // indirect
59+
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
60+
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
61+
github.com/pkg/errors v0.9.1 // indirect
62+
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
5963
github.com/rawlingsj/jsonschema v0.0.0-20210511142122-a9c2cfdb7dcf // indirect
60-
github.com/rickar/props v0.0.0-20170718221555-0b06aeb2f037 // indirect
6164
github.com/russross/blackfriday v1.6.0 // indirect
62-
github.com/sirupsen/logrus v1.8.1 // indirect
65+
github.com/sirupsen/logrus v1.9.3 // indirect
6366
github.com/vrischmann/envconfig v1.3.0 // indirect
64-
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect
67+
github.com/x448/float16 v0.8.4 // indirect
68+
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
6569
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
6670
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
67-
golang.org/x/crypto v0.16.0 // indirect
68-
golang.org/x/net v0.19.0 // indirect
69-
golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1 // indirect
70-
golang.org/x/sys v0.15.0 // indirect
71-
golang.org/x/term v0.15.0 // indirect
72-
golang.org/x/text v0.14.0 // indirect
73-
golang.org/x/time v0.0.0-20220922220347-f3bd1da661af // indirect
74-
google.golang.org/appengine v1.6.7 // indirect
75-
google.golang.org/protobuf v1.28.1 // indirect
71+
golang.org/x/net v0.34.0 // indirect
72+
golang.org/x/oauth2 v0.25.0 // indirect
73+
golang.org/x/sys v0.29.0 // indirect
74+
golang.org/x/term v0.28.0 // indirect
75+
golang.org/x/text v0.21.0 // indirect
76+
golang.org/x/time v0.9.0 // indirect
77+
google.golang.org/protobuf v1.36.3 // indirect
78+
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
7679
gopkg.in/inf.v0 v0.9.1 // indirect
7780
gopkg.in/yaml.v2 v2.4.0 // indirect
7881
gopkg.in/yaml.v3 v3.0.1 // indirect
79-
k8s.io/klog/v2 v2.80.1 // indirect
80-
k8s.io/kube-openapi v0.0.0-20211115234752-e816edb12b65 // indirect
81-
k8s.io/utils v0.0.0-20220922133306-665eaaec4324 // indirect
82-
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
83-
sigs.k8s.io/yaml v1.3.0 // indirect
84-
)
85-
86-
replace (
87-
k8s.io/api => k8s.io/api v0.22.15
88-
k8s.io/apimachinery => k8s.io/apimachinery v0.22.15
89-
k8s.io/client-go => k8s.io/client-go v0.22.15
82+
k8s.io/klog/v2 v2.130.1 // indirect
83+
k8s.io/kube-openapi v0.0.0-20241212222426-2c72e554b1e7 // indirect
84+
k8s.io/utils v0.0.0-20241210054802-24370beab758 // indirect
85+
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
86+
sigs.k8s.io/structured-merge-diff/v4 v4.5.0 // indirect
87+
sigs.k8s.io/yaml v1.4.0 // indirect
9088
)

0 commit comments

Comments
 (0)