Skip to content

Commit

Permalink
Build using golang 1.17.x
Browse files Browse the repository at this point in the history
  • Loading branch information
calind committed May 19, 2023
1 parent a413de5 commit 1eff7e9
Show file tree
Hide file tree
Showing 6 changed files with 93 additions and 17 deletions.
28 changes: 14 additions & 14 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,32 @@ steps:
tags: true

- name: install dependencies
image: docker.io/bitpoke/build:v0.7.0
image: docker.io/bitpoke/build:v0.8.3
commands:
- make -j4 build.tools

- name: verify generated code
image: docker.io/bitpoke/build:v0.7.0
image: docker.io/bitpoke/build:v0.8.3
commands:
- make generate
- git diff --exit-code

- name: lint
image: docker.io/bitpoke/build:v0.7.0
image: docker.io/bitpoke/build:v0.8.3
commands:
- make -j4 lint

- name: test
image: docker.io/bitpoke/build:v0.7.0
image: docker.io/bitpoke/build:v0.8.3
environment:
ACK_GINKGO_DEPRECATIONS: 1.16.4
commands:
- make test

- name: build
image: docker.io/bitpoke/build:v0.7.0
image: docker.io/bitpoke/build:v0.8.3
commands:
- make -j4 build
- make build

services:
- name: docker
Expand Down Expand Up @@ -80,12 +80,12 @@ steps:
tags: true

- name: build
image: docker.io/bitpoke/build:v0.7.0
image: docker.io/bitpoke/build:v0.8.3
commands:
- make -j4 build
- make build

- name: publish
image: docker.io/bitpoke/build:v0.7.0
image: docker.io/bitpoke/build:v0.8.3
environment:
DOCKER_REGISTRY: docker.io/bitpoke
DOCKER_USERNAME: bitpokebot
Expand Down Expand Up @@ -135,7 +135,7 @@ steps:
tags: true

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

- name: build
image: docker.io/bitpoke/build:v0.7.0
image: docker.io/bitpoke/build:v0.8.3
volumes:
- name: dockersock
path: /var/run
Expand All @@ -167,7 +167,7 @@ steps:
- git

- name: publish e2e images
image: docker.io/bitpoke/build:v0.7.0
image: docker.io/bitpoke/build:v0.8.3
environment:
<<: *e2eEnvironment
commands:
Expand All @@ -178,7 +178,7 @@ steps:
- build

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

- name: delete gke cluster
image: docker.io/bitpoke/build:v0.7.0
image: docker.io/bitpoke/build:v0.8.3
environment:
<<: *e2eEnvironment
commands:
Expand Down
19 changes: 19 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,25 @@ linters:
- goimports
- maligned
- gochecknoglobals
# TODO: fix those linters (they were added for 1.42.1 upgrade)
- sqlclosecheck
- gosec
- cyclop
- forcetypeassert
- revive
- gofumpt
- errorlint
- exhaustivestruct
- goerr113
- gosimple
- ifshort
- noctx
- predeclared
- nlreturn
- tagliatelle
- wrapcheck
- gci
- nolintlint
# TODO: fix those linters
- whitespace
- scopelint
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ include build/makelib/common.mk

GO111MODULE=on
GO_STATIC_PACKAGES = $(GO_PROJECT)/cmd/mysql-operator $(GO_PROJECT)/cmd/mysql-operator-sidecar $(GO_PROJECT)/cmd/orc-helper
GOLANGCI_LINT_VERSION = 1.25.0
GO_SUPPORTED_VERSIONS = 1.17
GOFMT_VERSION = 1.17
GOLANGCI_LINT_VERSION = 1.42.1
GO_LDFLAGS += \
-X $(GO_PROJECT)/pkg/version.buildDate=$(BUILD_DATE) \
-X $(GO_PROJECT)/pkg/version.gitVersion=$(VERSION) \
Expand Down
57 changes: 55 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/bitpoke/mysql-operator

go 1.16
go 1.17

require (
github.com/blang/semver v3.5.1+incompatible
Expand All @@ -17,7 +17,6 @@ require (
github.com/spf13/cobra v1.1.1
github.com/spf13/pflag v1.0.5
golang.org/x/net v0.8.0
gopkg.in/ini.v1 v1.57.0 // indirect

// kubernetes
k8s.io/api v0.21.4
Expand All @@ -28,3 +27,57 @@ require (
sigs.k8s.io/controller-runtime v0.9.7
sigs.k8s.io/testing_frameworks v0.1.2
)

require (
cloud.google.com/go v0.54.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/cespare/xxhash/v2 v2.1.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-logr/zapr v0.4.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-cmp v0.5.5 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/uuid v1.1.2 // indirect
github.com/googleapis/gnostic v0.5.5 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/iancoleman/strcase v0.0.0-20190422225806-e506e3ef7365 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/json-iterator/go v1.1.11 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.1 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.11.0 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.26.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.19.0 // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sys v0.6.0 // indirect
golang.org/x/term v0.6.0 // indirect
golang.org/x/text v0.8.0 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.26.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.57.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/apiextensions-apiserver v0.21.4 // indirect
k8s.io/component-base v0.21.4 // indirect
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect
k8s.io/utils v0.0.0-20210802155522-efc7438f0176 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
sigs.k8s.io/yaml v1.2.0 // indirect
)
1 change: 1 addition & 0 deletions pkg/apis/mysql/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pkg/apis/mysql/v1alpha1/zz_generated.defaults.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1eff7e9

Please sign in to comment.