Skip to content

Commit 8caa38e

Browse files
author
Dmitriy Matrenichev
committed
chore: bump deps
Bump deps: - run rekres - github.com/alessio/shellescape to v1.4.2 - github.com/containerd/containerd to v1.7.3 - github.com/emicklei/dot to v1.6.0 - github.com/moby/buildkit to v0.12.1 - github.com/otiai10/copy to v1.12.0 - github.com/stretchr/testify to v1.8.4 - golang.org/x/oauth2 to v0.11.0 - golang.org/x/sync to v0.3.0 Signed-off-by: Dmitriy Matrenichev <[email protected]>
1 parent 04bd0a3 commit 8caa38e

File tree

7 files changed

+107
-90
lines changed

7 files changed

+107
-90
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2022-12-06T13:30:08Z by kres e23a456.
3+
# Generated on 2023-08-10T14:47:54Z by kres latest.
44

55
*
66
!cmd
77
!internal
88
!go.mod
99
!go.sum
1010
!.golangci.yml
11+
!CHANGELOG.md
1112
!README.md
1213
!.markdownlint.json

.drone.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
33
#
4-
# Generated on 2023-03-21T07:09:40Z by kres f8f4e55.
4+
# Generated on 2023-08-10T14:47:54Z by kres latest.
55

66
kind: pipeline
77
type: kubernetes
@@ -261,7 +261,7 @@ steps:
261261

262262
services:
263263
- name: docker
264-
image: docker:23.0-dind
264+
image: docker:24.0-dind
265265
entrypoint:
266266
- dockerd
267267
commands:

.golangci.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2023-02-28T10:57:53Z by kres latest.
3+
# Generated on 2023-08-10T14:47:54Z by kres latest.
44

55
# options for analysis running
66
run:
@@ -36,7 +36,7 @@ linters-settings:
3636
lines: 60
3737
statements: 40
3838
gci:
39-
local-prefixes: github.com/siderolabs/bldr
39+
local-prefixes: github.com/siderolabs/bldr/
4040
gocognit:
4141
min-complexity: 30
4242
ireturn:
@@ -65,7 +65,7 @@ linters-settings:
6565
gofmt:
6666
simplify: true
6767
goimports:
68-
local-prefixes: github.com/siderolabs/bldr
68+
local-prefixes: github.com/siderolabs/bldr/
6969
golint:
7070
min-confidence: 0.8
7171
gomnd:
@@ -74,9 +74,6 @@ linters-settings:
7474
govet:
7575
check-shadowing: true
7676
enable-all: true
77-
depguard:
78-
list-type: blacklist
79-
include-go-root: false
8077
lll:
8178
line-length: 200
8279
tab-width: 4
@@ -118,6 +115,10 @@ linters-settings:
118115
cyclop:
119116
# the maximal code complexity to report
120117
max-complexity: 20
118+
# depguard:
119+
# Main:
120+
# deny:
121+
# - github.com/OpenPeeDeeP/depguard # this is just an example
121122

122123
linters:
123124
enable-all: true
@@ -145,6 +146,8 @@ linters:
145146
- typecheck
146147
- varnamelen
147148
- wrapcheck
149+
- depguard # Disabled because starting with golangci-lint 1.53.0 it doesn't allow denylist alone anymore
150+
- tagalign
148151
# abandoned linters for which golangci shows the warning that the repo is archived by the owner
149152
- interfacer
150153
- maligned

Dockerfile

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
# syntax = docker/dockerfile-upstream:1.5.2-labs
1+
# syntax = docker/dockerfile-upstream:1.6.0-labs
22

33
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
44
#
5-
# Generated on 2023-05-15T18:23:24Z by kres latest.
5+
# Generated on 2023-08-10T14:47:54Z by kres latest.
66

77
ARG TOOLCHAIN
88

99
# cleaned up specs and compiled versions
1010
FROM scratch AS generate
1111

12-
FROM ghcr.io/siderolabs/ca-certificates:v1.4.1 AS image-ca-certificates
12+
FROM ghcr.io/siderolabs/ca-certificates:v1.5.0 AS image-ca-certificates
1313

14-
FROM ghcr.io/siderolabs/fhs:v1.4.1 AS image-fhs
14+
FROM ghcr.io/siderolabs/fhs:v1.5.0 AS image-fhs
1515

1616
# runs markdownlint
17-
FROM docker.io/node:20.1.0-alpine3.17 AS lint-markdown
17+
FROM docker.io/node:20.5.0-alpine3.18 AS lint-markdown
1818
WORKDIR /src
19-
RUN npm i -g markdownlint-cli@0.34.0
19+
RUN npm i -g markdownlint-cli@0.35.0
2020
2121
COPY .markdownlint.json .
22+
COPY ./CHANGELOG.md ./CHANGELOG.md
2223
COPY ./README.md ./README.md
2324
RUN markdownlint --ignore "CHANGELOG.md" --ignore "**/node_modules/**" --ignore '**/hack/chglog/**' --rules node_modules/sentences-per-line/index.js .
2425

@@ -31,27 +32,32 @@ FROM --platform=${BUILDPLATFORM} toolchain AS tools
3132
ENV GO111MODULE on
3233
ARG CGO_ENABLED
3334
ENV CGO_ENABLED ${CGO_ENABLED}
35+
ARG GOTOOLCHAIN
36+
ENV GOTOOLCHAIN ${GOTOOLCHAIN}
37+
ARG GOEXPERIMENT
38+
ENV GOEXPERIMENT ${GOEXPERIMENT}
3439
ENV GOPATH /go
40+
ARG DEEPCOPY_VERSION
41+
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install github.com/siderolabs/deep-copy@${DEEPCOPY_VERSION} \
42+
&& mv /go/bin/deep-copy /bin/deep-copy
3543
ARG GOLANGCILINT_VERSION
3644
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install github.com/golangci/golangci-lint/cmd/golangci-lint@${GOLANGCILINT_VERSION} \
3745
&& mv /go/bin/golangci-lint /bin/golangci-lint
38-
ARG GOFUMPT_VERSION
39-
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
40-
&& mv /go/bin/gofumpt /bin/gofumpt
4146
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \
4247
&& mv /go/bin/govulncheck /bin/govulncheck
4348
ARG GOIMPORTS_VERSION
4449
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/tools/cmd/goimports@${GOIMPORTS_VERSION} \
4550
&& mv /go/bin/goimports /bin/goimports
46-
ARG DEEPCOPY_VERSION
47-
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install github.com/siderolabs/deep-copy@${DEEPCOPY_VERSION} \
48-
&& mv /go/bin/deep-copy /bin/deep-copy
51+
ARG GOFUMPT_VERSION
52+
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
53+
&& mv /go/bin/gofumpt /bin/gofumpt
4954

5055
# tools and sources
5156
FROM tools AS base
5257
WORKDIR /src
53-
COPY ./go.mod .
54-
COPY ./go.sum .
58+
COPY go.mod go.mod
59+
COPY go.sum go.sum
60+
RUN cd .
5561
RUN --mount=type=cache,target=/go/pkg go mod download
5662
RUN --mount=type=cache,target=/go/pkg go mod verify
5763
COPY ./cmd ./cmd
@@ -116,25 +122,29 @@ RUN FILES="$(gofumpt -l .)" && test -z "${FILES}" || (echo -e "Source code is no
116122

117123
# runs goimports
118124
FROM base AS lint-goimports
119-
RUN FILES="$(goimports -l -local github.com/siderolabs/bldr .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/siderolabs/bldr .':\n${FILES}"; exit 1)
125+
RUN FILES="$(goimports -l -local github.com/siderolabs/bldr/ .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/siderolabs/bldr/ .':\n${FILES}"; exit 1)
120126

121127
# runs golangci-lint
122128
FROM base AS lint-golangci-lint
129+
WORKDIR /src
123130
COPY .golangci.yml .
124131
ENV GOGC 50
125132
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/root/.cache/golangci-lint --mount=type=cache,target=/go/pkg golangci-lint run --config .golangci.yml
126133

127134
# runs govulncheck
128135
FROM base AS lint-govulncheck
136+
WORKDIR /src
129137
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg govulncheck ./...
130138

131139
# runs unit-tests with race detector
132140
FROM base AS unit-tests-race
141+
WORKDIR /src
133142
ARG TESTPKGS
134143
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg --mount=type=cache,target=/tmp CGO_ENABLED=1 go test -v -race -count 1 ${TESTPKGS}
135144

136145
# runs unit-tests
137146
FROM base AS unit-tests-run
147+
WORKDIR /src
138148
ARG TESTPKGS
139149
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg --mount=type=cache,target=/tmp go test -v -covermode=atomic -coverprofile=coverage.txt -coverpkg=${TESTPKGS} -count 1 ${TESTPKGS}
140150

@@ -155,7 +165,7 @@ FROM scratch AS integration.test
155165
COPY --from=integration-build /src/integration.test /integration.test
156166

157167
FROM scratch AS unit-tests
158-
COPY --from=unit-tests-run /src/coverage.txt /coverage.txt
168+
COPY --from=unit-tests-run /src/coverage.txt /coverage-unit-tests.txt
159169

160170
FROM bldr-linux-${TARGETARCH} AS bldr
161171

Makefile

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,33 @@
11
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
22
#
3-
# Generated on 2023-05-15T18:23:24Z by kres latest.
3+
# Generated on 2023-08-10T15:46:20Z by kres latest.
44

55
# common variables
66

77
SHA := $(shell git describe --match=none --always --abbrev=8 --dirty)
88
TAG := $(shell git describe --tag --always --dirty)
9+
ABBREV_TAG := $(shell git describe --tags >/dev/null 2>/dev/null && git describe --tag --always --match v[0-9]\* --abbrev=0 || echo 'undefined')
910
BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
1011
ARTIFACTS := _out
1112
WITH_DEBUG ?= false
1213
WITH_RACE ?= false
1314
REGISTRY ?= ghcr.io
1415
USERNAME ?= siderolabs
1516
REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME)
16-
GOLANGCILINT_VERSION ?= v1.52.2
17-
GOFUMPT_VERSION ?= v0.5.0
18-
GO_VERSION ?= 1.20
19-
GOIMPORTS_VERSION ?= v0.9.1
2017
PROTOBUF_GO_VERSION ?= 1.28.1
2118
GRPC_GO_VERSION ?= 1.3.0
22-
GRPC_GATEWAY_VERSION ?= 2.15.2
19+
GRPC_GATEWAY_VERSION ?= 2.16.2
2320
VTPROTOBUF_VERSION ?= 0.4.0
2421
DEEPCOPY_VERSION ?= v0.5.5
22+
GOLANGCILINT_VERSION ?= v1.54.0
23+
GOFUMPT_VERSION ?= v0.5.0
24+
GO_VERSION ?= 1.21
25+
GOIMPORTS_VERSION ?= v0.12.0
2526
GO_BUILDFLAGS ?=
2627
GO_LDFLAGS ?=
2728
CGO_ENABLED ?= 0
29+
GOTOOLCHAIN ?= local
30+
GOEXPERIMENT ?= loopvar
2831
TESTPKGS ?= ./...
2932
KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest
3033
CONFORMANCE_IMAGE ?= ghcr.io/siderolabs/conform:latest
@@ -43,22 +46,25 @@ COMMON_ARGS += --push=$(PUSH)
4346
COMMON_ARGS += --build-arg=ARTIFACTS="$(ARTIFACTS)"
4447
COMMON_ARGS += --build-arg=SHA="$(SHA)"
4548
COMMON_ARGS += --build-arg=TAG="$(TAG)"
49+
COMMON_ARGS += --build-arg=ABBREV_TAG="$(ABBREV_TAG)"
4650
COMMON_ARGS += --build-arg=USERNAME="$(USERNAME)"
4751
COMMON_ARGS += --build-arg=REGISTRY="$(REGISTRY)"
4852
COMMON_ARGS += --build-arg=TOOLCHAIN="$(TOOLCHAIN)"
4953
COMMON_ARGS += --build-arg=CGO_ENABLED="$(CGO_ENABLED)"
5054
COMMON_ARGS += --build-arg=GO_BUILDFLAGS="$(GO_BUILDFLAGS)"
5155
COMMON_ARGS += --build-arg=GO_LDFLAGS="$(GO_LDFLAGS)"
52-
COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION="$(GOLANGCILINT_VERSION)"
53-
COMMON_ARGS += --build-arg=GOFUMPT_VERSION="$(GOFUMPT_VERSION)"
54-
COMMON_ARGS += --build-arg=GOIMPORTS_VERSION="$(GOIMPORTS_VERSION)"
56+
COMMON_ARGS += --build-arg=GOTOOLCHAIN="$(GOTOOLCHAIN)"
57+
COMMON_ARGS += --build-arg=GOEXPERIMENT="$(GOEXPERIMENT)"
5558
COMMON_ARGS += --build-arg=PROTOBUF_GO_VERSION="$(PROTOBUF_GO_VERSION)"
5659
COMMON_ARGS += --build-arg=GRPC_GO_VERSION="$(GRPC_GO_VERSION)"
5760
COMMON_ARGS += --build-arg=GRPC_GATEWAY_VERSION="$(GRPC_GATEWAY_VERSION)"
5861
COMMON_ARGS += --build-arg=VTPROTOBUF_VERSION="$(VTPROTOBUF_VERSION)"
5962
COMMON_ARGS += --build-arg=DEEPCOPY_VERSION="$(DEEPCOPY_VERSION)"
63+
COMMON_ARGS += --build-arg=GOLANGCILINT_VERSION="$(GOLANGCILINT_VERSION)"
64+
COMMON_ARGS += --build-arg=GOIMPORTS_VERSION="$(GOIMPORTS_VERSION)"
65+
COMMON_ARGS += --build-arg=GOFUMPT_VERSION="$(GOFUMPT_VERSION)"
6066
COMMON_ARGS += --build-arg=TESTPKGS="$(TESTPKGS)"
61-
TOOLCHAIN ?= docker.io/golang:1.20-alpine
67+
TOOLCHAIN ?= docker.io/golang:1.21-alpine
6268

6369
# extra variables
6470

@@ -130,7 +136,8 @@ lint-gofumpt: ## Runs gofumpt linter.
130136
.PHONY: fmt
131137
fmt: ## Formats the source code
132138
@docker run --rm -it -v $(PWD):/src -w /src golang:$(GO_VERSION) \
133-
bash -c "export GO111MODULE=on; export GOPROXY=https://proxy.golang.org; \
139+
bash -c "export GOEXPERIMENT=loopvar; export GOTOOLCHAIN=local; \
140+
export GO111MODULE=on; export GOPROXY=https://proxy.golang.org; \
134141
go install mvdan.cc/gofumpt@$(GOFUMPT_VERSION) && \
135142
gofumpt -w ."
136143

@@ -154,7 +161,7 @@ unit-tests-race: ## Performs unit tests with race detection enabled.
154161

155162
.PHONY: coverage
156163
coverage: ## Upload coverage data to codecov.io.
157-
bash -c "bash <(curl -s https://codecov.io/bash) -f $(ARTIFACTS)/coverage.txt -X fix"
164+
bash -c "bash <(curl -s https://codecov.io/bash) -f $(ARTIFACTS)/coverage-unit-tests.txt -X fix"
158165

159166
.PHONY: $(ARTIFACTS)/bldr-darwin-amd64
160167
$(ARTIFACTS)/bldr-darwin-amd64:

go.mod

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ go 1.20
55
require (
66
github.com/Masterminds/semver v1.5.0
77
github.com/Masterminds/sprig/v3 v3.2.3
8-
github.com/alessio/shellescape v1.4.1
9-
github.com/containerd/containerd v1.7.1
10-
github.com/emicklei/dot v1.4.2
8+
github.com/alessio/shellescape v1.4.2
9+
github.com/containerd/containerd v1.7.3
10+
github.com/emicklei/dot v1.6.0
1111
github.com/google/go-github/v52 v52.0.1-0.20230514113659-60429b4ba0ba
1212
github.com/hashicorp/go-multierror v1.1.1
13-
github.com/moby/buildkit v0.11.0-rc3.0.20230515120052-a9e8e39bae29
13+
github.com/moby/buildkit v0.12.1
1414
github.com/opencontainers/go-digest v1.0.0
1515
github.com/opencontainers/image-spec v1.1.0-rc3
16-
github.com/otiai10/copy v1.11.0
16+
github.com/otiai10/copy v1.12.0
1717
github.com/spf13/cobra v1.7.0
18-
github.com/stretchr/testify v1.8.2
19-
golang.org/x/oauth2 v0.7.0
20-
golang.org/x/sync v0.2.0
18+
github.com/stretchr/testify v1.8.4
19+
golang.org/x/oauth2 v0.11.0
20+
golang.org/x/sync v0.3.0
2121
gopkg.in/yaml.v3 v3.0.1
2222
)
2323

@@ -27,11 +27,11 @@ require (
2727
github.com/Microsoft/go-winio v0.6.1 // indirect
2828
github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 // indirect
2929
github.com/cloudflare/circl v1.3.3 // indirect
30-
github.com/containerd/continuity v0.3.0 // indirect
30+
github.com/containerd/continuity v0.4.1 // indirect
3131
github.com/containerd/typeurl/v2 v2.1.1 // indirect
3232
github.com/davecgh/go-spew v1.1.1 // indirect
3333
github.com/docker/distribution v2.8.2+incompatible // indirect
34-
github.com/docker/docker v23.0.5+incompatible // indirect
34+
github.com/docker/docker v24.0.0-rc.2.0.20230718135204-8e51b8b59cb8+incompatible // indirect
3535
github.com/gogo/googleapis v1.4.1 // indirect
3636
github.com/gogo/protobuf v1.3.2 // indirect
3737
github.com/golang/protobuf v1.5.3 // indirect
@@ -52,18 +52,18 @@ require (
5252
github.com/sirupsen/logrus v1.9.0 // indirect
5353
github.com/spf13/cast v1.3.1 // indirect
5454
github.com/spf13/pflag v1.0.5 // indirect
55-
github.com/tonistiigi/fsutil v0.0.0-20230105215944-fb433841cbfa // indirect
55+
github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb // indirect
5656
go.opentelemetry.io/otel v1.14.0 // indirect
5757
go.opentelemetry.io/otel/trace v1.14.0 // indirect
58-
golang.org/x/crypto v0.7.0 // indirect
58+
golang.org/x/crypto v0.12.0 // indirect
5959
golang.org/x/mod v0.9.0 // indirect
60-
golang.org/x/net v0.9.0 // indirect
61-
golang.org/x/sys v0.7.0 // indirect
62-
golang.org/x/text v0.9.0 // indirect
60+
golang.org/x/net v0.14.0 // indirect
61+
golang.org/x/sys v0.11.0 // indirect
62+
golang.org/x/text v0.12.0 // indirect
6363
golang.org/x/tools v0.7.0 // indirect
6464
google.golang.org/appengine v1.6.7 // indirect
6565
google.golang.org/genproto v0.0.0-20230306155012-7f2fa6fef1f4 // indirect
6666
google.golang.org/grpc v1.53.0 // indirect
67-
google.golang.org/protobuf v1.30.0 // indirect
67+
google.golang.org/protobuf v1.31.0 // indirect
6868
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
6969
)

0 commit comments

Comments
 (0)