Skip to content

Commit ced5ddb

Browse files
authored
updated base image to ubi9 (#334)
* updated base image to ubi9 Signed-off-by: Henry Li <[email protected]> * updated golangci-lint config for 1.60.x Signed-off-by: Henry Li <[email protected]> --------- Signed-off-by: Henry Li <[email protected]>
1 parent 317065e commit ced5ddb

File tree

4 files changed

+39
-24
lines changed

4 files changed

+39
-24
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Build the manager binary
2-
FROM golang:1.22.5-bullseye as builder
2+
FROM golang:1.23.0-bullseye as builder
33
ARG GOARCH
44

55
WORKDIR /workspace
@@ -21,7 +21,7 @@ RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -o namespace-scope-opera
2121
# Use distroless as minimal base image to package the manager binary
2222
# Refer to https://github.com/GoogleContainerTools/distroless for more details
2323
# FROM gcr.io/distroless/static:nonroot
24-
FROM docker-na-public.artifactory.swg-devops.com/hyc-cloud-private-edge-docker-local/build-images/ubi8-minimal:latest
24+
FROM docker-na-public.artifactory.swg-devops.com/hyc-cloud-private-edge-docker-local/build-images/ubi9-minimal:latest
2525

2626
ARG VCS_REF
2727
ARG VCS_URL

common/config/.golangci.yml

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
service:
22
# When updating this, also update the version stored in docker/build-tools/Dockerfile in the multicloudlab/tools repo.
3-
golangci-lint-version: 1.51.x # use the fixed version to not introduce new linters unexpectedly
3+
golangci-lint-version: 1.60.x # use the fixed version to not introduce new linters unexpectedly
44
run:
55
# timeout for analysis, e.g. 30s, 5m, default is 1m
66
deadline: 20m
@@ -10,46 +10,45 @@ run:
1010
# default value is empty list, but next dirs are always skipped independently
1111
# from this option's value:
1212
# vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
13-
skip-dirs:
14-
- genfiles$
15-
- vendor$
13+
# skip-dirs:
14+
# - genfiles$
15+
# - vendor$
1616

1717
# which files to skip: they will be analyzed, but issues from them
1818
# won't be reported. Default value is empty list, but there is
1919
# no need to include all autogenerated files, we confidently recognize
2020
# autogenerated files. If it's not please let us know.
21-
skip-files:
22-
- ".*\\.pb\\.go"
23-
- ".*\\.gen\\.go"
21+
# skip-files:
22+
# - ".*\\.pb\\.go"
23+
# - ".*\\.gen\\.go"
2424

2525
linters:
2626
# please, do not use `enable-all`: it's deprecated and will be removed soon.
2727
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
2828
disable-all: true
2929
enable:
30-
- revive
30+
# - deadcode
3131
- errcheck
32-
- gocyclo
32+
# - gocyclo
3333
- gofmt
3434
- goimports
35-
- gosec
35+
# - golint
36+
- revive
37+
# - gosec
3638
- gosimple
3739
- govet
40+
# - ineffassign
41+
# - interfacer
3842
- lll
39-
- misspell
43+
# - misspell
4044
- staticcheck
45+
# - structcheck
4146
- typecheck
4247
- unconvert
4348
- unparam
4449
- unused
45-
50+
# - varcheck
4651
# don't enable:
47-
# - deadcode
48-
# - golint
49-
# - ineffassign
50-
# - interfacer
51-
# - varcheck
52-
# - structcheck
5352
# - gocritic
5453
# - bodyclose
5554
# - depguard
@@ -102,7 +101,7 @@ linters-settings:
102101
lll:
103102
# max line length, lines longer will be reported. Default is 120.
104103
# '\t' is counted as 1 character by default, and can be changed with the tab-width option
105-
line-length: 300
104+
line-length: 400
106105
# tab width in spaces. Default to 1.
107106
tab-width: 1
108107
unused:
@@ -186,6 +185,15 @@ linters-settings:
186185
# - unlabelStmt
187186
# - unnamedResult
188187
# - wrapperFunc
188+
189+
revive:
190+
rules:
191+
- name: dot-imports
192+
arguments:
193+
- allowedPackages:
194+
- "github.com/onsi/ginkgo"
195+
- "github.com/onsi/ginkgo/v2"
196+
- "github.com/onsi/gomega"
189197

190198
issues:
191199
# List of regexps of issue texts to exclude, empty list by default.
@@ -195,6 +203,14 @@ issues:
195203
exclude:
196204
- composite literal uses unkeyed fields
197205

206+
exclude-dirs:
207+
- genfiles$
208+
- vendor$
209+
210+
exclude-files:
211+
- ".*\\.pb\\.go"
212+
- ".*\\.gen\\.go"
213+
198214
exclude-rules:
199215
# Exclude some linters from running on test files.
200216
- path: _test\.go$|^tests/|^samples/

common/scripts/lint_go.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
# limitations under the License.
1616
#
1717

18-
GOGC=25 golangci-lint run -c ./common/config/.golangci.yml
18+
GOGC=25 golangci-lint run -c ./common/config/.golangci.yml --timeout=180s

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/IBM/ibm-namespace-scope-operator/v4
22

3-
go 1.21
3+
go 1.23
44

55
require (
66
github.com/IBM/controller-filtered-cache v0.3.4
@@ -76,4 +76,3 @@ require (
7676

7777
// fix vulnerability: CVE-2021-3121 in github.com/gogo/protobuf < v1.3.2
7878
replace github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2
79-

0 commit comments

Comments
 (0)