You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- run rekres
- github.com/stretchr/testify to v1.8.4
- github.com/cloudflare/circl to v1.3.3
Signed-off-by: Dmitriy Matrenichev <dmitry.matrenichev@siderolabs.com>
Copy file name to clipboardExpand all lines: Dockerfile
+21-16Lines changed: 21 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
4
4
#
5
-
# Generated on 2023-05-17T06:53:41Z by kres latest.
5
+
# Generated on 2023-06-05T13:33:56Z by kres latest.
6
6
7
7
ARG TOOLCHAIN
8
8
@@ -37,17 +37,6 @@ ENV GO111MODULE on
37
37
ARG CGO_ENABLED
38
38
ENV CGO_ENABLED ${CGO_ENABLED}
39
39
ENV GOPATH /go
40
-
ARG GOLANGCILINT_VERSION
41
-
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} \
42
-
&& mv /go/bin/golangci-lint /bin/golangci-lint
43
-
ARG GOFUMPT_VERSION
44
-
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
45
-
&& mv /go/bin/gofumpt /bin/gofumpt
46
-
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \
47
-
&& mv /go/bin/govulncheck /bin/govulncheck
48
-
ARG GOIMPORTS_VERSION
49
-
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} \
50
-
&& mv /go/bin/goimports /bin/goimports
51
40
ARG PROTOBUF_GO_VERSION
52
41
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install google.golang.org/protobuf/cmd/protoc-gen-go@v${PROTOBUF_GO_VERSION}
53
42
RUN mv /go/bin/protoc-gen-go /bin
@@ -63,12 +52,24 @@ RUN mv /go/bin/protoc-gen-go-vtproto /bin
63
52
ARG DEEPCOPY_VERSION
64
53
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install github.com/siderolabs/deep-copy@${DEEPCOPY_VERSION} \
65
54
&& mv /go/bin/deep-copy /bin/deep-copy
55
+
ARG GOLANGCILINT_VERSION
56
+
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} \
57
+
&& mv /go/bin/golangci-lint /bin/golangci-lint
58
+
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg go install golang.org/x/vuln/cmd/govulncheck@latest \
59
+
&& mv /go/bin/govulncheck /bin/govulncheck
60
+
ARG GOIMPORTS_VERSION
61
+
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} \
62
+
&& mv /go/bin/goimports /bin/goimports
63
+
ARG GOFUMPT_VERSION
64
+
RUN go install mvdan.cc/gofumpt@${GOFUMPT_VERSION} \
65
+
&& mv /go/bin/gofumpt /bin/gofumpt
66
66
67
67
# tools and sources
68
68
FROM tools AS base
69
69
WORKDIR /src
70
-
COPY ./go.mod .
71
-
COPY ./go.sum .
70
+
COPY go.mod go.mod
71
+
COPY go.sum go.sum
72
+
RUN cd .
72
73
RUN --mount=type=cache,target=/go/pkg go mod download
73
74
RUN --mount=type=cache,target=/go/pkg go mod verify
74
75
COPY ./api ./api
@@ -95,25 +96,29 @@ RUN FILES="$(gofumpt -l .)" && test -z "${FILES}" || (echo -e "Source code is no
95
96
96
97
# runs goimports
97
98
FROM base AS lint-goimports
98
-
RUN FILES="$(goimports -l -local github.com/cosi-project/runtime .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/cosi-project/runtime .':\n${FILES}"; exit 1)
99
+
RUN FILES="$(goimports -l -local github.com/cosi-project/runtime/ .)" && test -z "${FILES}" || (echo -e "Source code is not formatted with 'goimports -w -local github.com/cosi-project/runtime/ .':\n${FILES}"; exit 1)
99
100
100
101
# runs golangci-lint
101
102
FROM base AS lint-golangci-lint
103
+
WORKDIR /src
102
104
COPY .golangci.yml .
103
105
ENV GOGC 50
104
106
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
105
107
106
108
# runs govulncheck
107
109
FROM base AS lint-govulncheck
110
+
WORKDIR /src
108
111
RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg govulncheck ./...
109
112
110
113
# runs unit-tests with race detector
111
114
FROM base AS unit-tests-race
115
+
WORKDIR /src
112
116
ARG TESTPKGS
113
117
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 -p 1 ${TESTPKGS}
114
118
115
119
# runs unit-tests
116
120
FROM base AS unit-tests-run
121
+
WORKDIR /src
117
122
ARG TESTPKGS
118
123
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 -p 1 ${TESTPKGS}
@@ -117,6 +117,9 @@ target-%: ## Builds the specified target defined in the Dockerfile. The build r
117
117
local-%: ## Builds the specified target defined in the Dockerfile using the local output type. The build result will be output to the specified local destination.
0 commit comments