Skip to content

Commit 04affa0

Browse files
committed
Build using golang 1.17.x
1 parent 32bf4ac commit 04affa0

File tree

6 files changed

+93
-17
lines changed

6 files changed

+93
-17
lines changed

.drone.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,32 +17,32 @@ steps:
1717
tags: true
1818

1919
- name: install dependencies
20-
image: docker.io/bitpoke/build:v0.7.0
20+
image: docker.io/bitpoke/build:v0.8.3
2121
commands:
2222
- make -j4 build.tools
2323

2424
- name: verify generated code
25-
image: docker.io/bitpoke/build:v0.7.0
25+
image: docker.io/bitpoke/build:v0.8.3
2626
commands:
2727
- make generate
2828
- git diff --exit-code
2929

3030
- name: lint
31-
image: docker.io/bitpoke/build:v0.7.0
31+
image: docker.io/bitpoke/build:v0.8.3
3232
commands:
3333
- make -j4 lint
3434

3535
- name: test
36-
image: docker.io/bitpoke/build:v0.7.0
36+
image: docker.io/bitpoke/build:v0.8.3
3737
environment:
3838
ACK_GINKGO_DEPRECATIONS: 1.16.4
3939
commands:
4040
- make test
4141

4242
- name: build
43-
image: docker.io/bitpoke/build:v0.7.0
43+
image: docker.io/bitpoke/build:v0.8.3
4444
commands:
45-
- make -j4 build
45+
- make build
4646

4747
services:
4848
- name: docker
@@ -80,12 +80,12 @@ steps:
8080
tags: true
8181

8282
- name: build
83-
image: docker.io/bitpoke/build:v0.7.0
83+
image: docker.io/bitpoke/build:v0.8.3
8484
commands:
85-
- make -j4 build
85+
- make build
8686

8787
- name: publish
88-
image: docker.io/bitpoke/build:v0.7.0
88+
image: docker.io/bitpoke/build:v0.8.3
8989
environment:
9090
DOCKER_REGISTRY: docker.io/bitpoke
9191
DOCKER_USERNAME: bitpokebot
@@ -135,7 +135,7 @@ steps:
135135
tags: true
136136

137137
- name: create gke cluster
138-
image: docker.io/bitpoke/build:v0.7.0
138+
image: docker.io/bitpoke/build:v0.8.3
139139
environment: &e2eEnvironment
140140
# set version in stone, as we need stable tags for e2e testing
141141
VERSION: ${DRONE_COMMIT}
@@ -156,7 +156,7 @@ steps:
156156
--monitoring=NONE
157157

158158
- name: build
159-
image: docker.io/bitpoke/build:v0.7.0
159+
image: docker.io/bitpoke/build:v0.8.3
160160
volumes:
161161
- name: dockersock
162162
path: /var/run
@@ -167,7 +167,7 @@ steps:
167167
- git
168168

169169
- name: publish e2e images
170-
image: docker.io/bitpoke/build:v0.7.0
170+
image: docker.io/bitpoke/build:v0.8.3
171171
environment:
172172
<<: *e2eEnvironment
173173
commands:
@@ -178,7 +178,7 @@ steps:
178178
- build
179179

180180
- name: e2e test
181-
image: docker.io/bitpoke/build:v0.7.0
181+
image: docker.io/bitpoke/build:v0.8.3
182182
environment:
183183
<<: *e2eEnvironment
184184
GOOGLE_CLOUD_CLUSTER: mysql-operator-e2e-testing-${DRONE_COMMIT:0:8}
@@ -191,7 +191,7 @@ steps:
191191
- create gke cluster
192192

193193
- name: delete gke cluster
194-
image: docker.io/bitpoke/build:v0.7.0
194+
image: docker.io/bitpoke/build:v0.8.3
195195
environment:
196196
<<: *e2eEnvironment
197197
commands:

.golangci.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,25 @@ linters:
3535
- goimports
3636
- maligned
3737
- gochecknoglobals
38+
# TODO: fix those linters (they were added for 1.42.1 upgrade)
39+
- sqlclosecheck
40+
- gosec
41+
- cyclop
42+
- forcetypeassert
43+
- revive
44+
- gofumpt
45+
- errorlint
46+
- exhaustivestruct
47+
- goerr113
48+
- gosimple
49+
- ifshort
50+
- noctx
51+
- predeclared
52+
- nlreturn
53+
- tagliatelle
54+
- wrapcheck
55+
- gci
56+
- nolintlint
3857
# TODO: fix those linters
3958
- whitespace
4059
- scopelint

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ include build/makelib/common.mk
77

88
GO111MODULE=on
99
GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/mysql-operator $(GO_PROJECT)/cmd/mysql-operator-sidecar $(GO_PROJECT)/cmd/orc-helper
10-
GOLANGCI_LINT_VERSION = 1.25.0
10+
GO_SUPPORTED_VERSIONS = 1.17
11+
GOFMT_VERSION = 1.17
12+
GOLANGCI_LINT_VERSION = 1.42.1
1113
GO_LDFLAGS += \
1214
-X $(GO_PROJECT)/pkg/version.buildDate=$(BUILD_DATE) \
1315
-X $(GO_PROJECT)/pkg/version.gitVersion=$(VERSION) \

go.mod

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/bitpoke/mysql-operator
22

3-
go 1.16
3+
go 1.17
44

55
require (
66
github.com/blang/semver v3.5.1+incompatible
@@ -17,7 +17,6 @@ require (
1717
github.com/spf13/cobra v1.1.1
1818
github.com/spf13/pflag v1.0.5
1919
golang.org/x/net v0.8.0
20-
gopkg.in/ini.v1 v1.57.0 // indirect
2120

2221
// kubernetes
2322
k8s.io/api v0.21.4
@@ -28,3 +27,57 @@ require (
2827
sigs.k8s.io/controller-runtime v0.9.7
2928
sigs.k8s.io/testing_frameworks v0.1.2
3029
)
30+
31+
require (
32+
cloud.google.com/go v0.54.0 // indirect
33+
github.com/beorn7/perks v1.0.1 // indirect
34+
github.com/blendle/zapdriver v1.3.1 // indirect
35+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
36+
github.com/davecgh/go-spew v1.1.1 // indirect
37+
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
38+
github.com/fsnotify/fsnotify v1.4.9 // indirect
39+
github.com/go-logr/zapr v0.4.0 // indirect
40+
github.com/gogo/protobuf v1.3.2 // indirect
41+
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
42+
github.com/golang/protobuf v1.5.2 // indirect
43+
github.com/google/go-cmp v0.5.5 // indirect
44+
github.com/google/gofuzz v1.1.0 // indirect
45+
github.com/google/uuid v1.1.2 // indirect
46+
github.com/googleapis/gnostic v0.5.5 // indirect
47+
github.com/hashicorp/golang-lru v0.5.4 // indirect
48+
github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365 // indirect
49+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
50+
github.com/json-iterator/go v1.1.11 // indirect
51+
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
52+
github.com/moby/spdystream v0.2.0 // indirect
53+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
54+
github.com/modern-go/reflect2 v1.0.1 // indirect
55+
github.com/nxadm/tail v1.4.8 // indirect
56+
github.com/pkg/errors v0.9.1 // indirect
57+
github.com/prometheus/client_golang v1.11.0 // indirect
58+
github.com/prometheus/client_model v0.2.0 // indirect
59+
github.com/prometheus/common v0.26.0 // indirect
60+
github.com/prometheus/procfs v0.6.0 // indirect
61+
go.uber.org/atomic v1.7.0 // indirect
62+
go.uber.org/multierr v1.6.0 // indirect
63+
go.uber.org/zap v1.19.0 // indirect
64+
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
65+
golang.org/x/sys v0.6.0 // indirect
66+
golang.org/x/term v0.6.0 // indirect
67+
golang.org/x/text v0.8.0 // indirect
68+
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
69+
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
70+
google.golang.org/appengine v1.6.7 // indirect
71+
google.golang.org/protobuf v1.26.0 // indirect
72+
gopkg.in/inf.v0 v0.9.1 // indirect
73+
gopkg.in/ini.v1 v1.57.0 // indirect
74+
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
75+
gopkg.in/yaml.v2 v2.4.0 // indirect
76+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
77+
k8s.io/apiextensions-apiserver v0.21.4 // indirect
78+
k8s.io/component-base v0.21.4 // indirect
79+
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect
80+
k8s.io/utils v0.0.0-20210802155522-efc7438f0176 // indirect
81+
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
82+
sigs.k8s.io/yaml v1.2.0 // indirect
83+
)

pkg/apis/mysql/v1alpha1/zz_generated.deepcopy.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/mysql/v1alpha1/zz_generated.defaults.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)