Skip to content

Commit aa29e13

Browse files
authored
Add benchtool to the release process and release v0.10.4 (#213)
* Add benchtool to release process * Update go image to golang:1.16.8-stretch * Update alpine image to alpine:3.14 * Update changelog * Add benchtool to the changelog instructions
1 parent c2987e5 commit aa29e13

File tree

12 files changed

+111
-13
lines changed

12 files changed

+111
-13
lines changed

.dockerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/dist/

.goreleaser.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,41 @@ builds:
4040
goarch:
4141
- amd64
4242
- 386
43+
- id: benchtool-darwin
44+
ldflags:
45+
-s -w -X github.com/grafana/cortex-tools/pkg/version.Version={{.Version}}
46+
binary: benchtool
47+
env:
48+
- CGO_ENABLED=0
49+
main: ./cmd/benchtool/
50+
goos:
51+
- darwin
52+
goarch:
53+
- amd64
54+
- arm64
55+
- id: benchtool-linux
56+
ldflags:
57+
-s -w -X github.com/grafana/cortex-tools/pkg/version.Version={{.Version}}
58+
binary: benchtool
59+
env:
60+
- CGO_ENABLED=0
61+
main: ./cmd/benchtool/
62+
goos:
63+
- linux
64+
goarch:
65+
- amd64
66+
- id: benchtool-windows
67+
ldflags:
68+
-s -w -X github.com/grafana/cortex-tools/pkg/version.Version={{.Version}}
69+
binary: benchtool
70+
env:
71+
- CGO_ENABLED=0
72+
main: ./cmd/benchtool/
73+
goos:
74+
- windows
75+
goarch:
76+
- amd64
77+
- 386
4378
archives:
4479
- replacements:
4580
darwin: mac-os
@@ -85,6 +120,22 @@ dockers:
85120
- "--label=org.opencontainers.image.version={{.Version}}"
86121
- "--label=repository=https://github.com/grafana/cortex-tools"
87122
- "--label=homepage=https://grafana.com"
123+
- goos: linux
124+
goarch: amd64
125+
ids:
126+
- benchtool-linux
127+
dockerfile: cmd/benchtool/GR.Dockerfile
128+
image_templates:
129+
- "grafana/benchtool:latest"
130+
- "grafana/benchtool:{{ .Tag }}"
131+
build_flag_templates:
132+
- "--pull"
133+
- "--label=org.opencontainers.image.created={{.Date}}"
134+
- "--label=org.opencontainers.image.name=benchtool"
135+
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
136+
- "--label=org.opencontainers.image.version={{.Version}}"
137+
- "--label=repository=https://github.com/grafana/cortex-tools/tree/main/cmd/benchtool"
138+
- "--label=homepage=https://grafana.com"
88139
brews:
89140
-
90141
tap:

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
Order should be `CHANGE`, `FEATURE`, `ENHANCEMENT`, and `BUGFIX`
44

5+
## v0.10.4
6+
7+
* [CHANGE] Update go image to v1.16.8. #213
8+
* [CHANGE] Update alpine image to v3.14. #213
9+
* [ENHANCEMENT] Add benchtool to the release process. #213
10+
511
## v0.10.3
612

713
* [BUGFIX] Fix `cortextool analyse grafana` failure on certain dashboards that use templating and/or panel heights due to unmarshalling errors with the underlying `grafana-tools/sdk` library. #192

changelogs/v0.10.4.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# v0.10.4 Release
2+
3+
## Changes
4+
5+
* [CHANGE] Update go image to v1.16.8. #213
6+
* [CHANGE] Update alpine image to v3.14. #213
7+
* [ENHANCEMENT] Add benchtool to the release process. #213
8+
9+
## Installation
10+
11+
## cortextool
12+
13+
```console
14+
# download the binary (adapt os and arch as needed)
15+
$ curl -fSL -o "cortextool" "https://github.com/grafana/cortex-tools/releases/download/v0.10.4/cortextool_0.10.4_linux_x86_64"
16+
17+
# make it executable
18+
$ chmod a+x "cortextool"
19+
20+
# have fun :)
21+
$ ./cortextool --help
22+
```
23+
24+
## benchtool
25+
26+
```console
27+
# download the binary (adapt os and arch as needed)
28+
$ curl -fSL -o "benchtool" "https://github.com/grafana/cortex-tools/releases/download/v0.10.4/benchtool_0.10.4_linux_x86_64"
29+
30+
# make it executable
31+
$ chmod a+x "benchtool"
32+
33+
# have fun :)
34+
$ ./benchtool --help
35+
```

cmd/benchtool/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM golang:1.16.3-stretch as build
1+
FROM golang:1.16.8-stretch as build
22
ARG GOARCH="amd64"
33
COPY . /build_dir
44
WORKDIR /build_dir
55
ENV GOPROXY=https://proxy.golang.org
66
RUN make clean && make benchtool
77

8-
FROM alpine:3.13
8+
FROM alpine:3.14
99
RUN apk add --update --no-cache ca-certificates
1010
COPY --from=build /build_dir/cmd/benchtool/benchtool /usr/bin/benchtool
1111
EXPOSE 80

cmd/benchtool/GR.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM alpine:3.14
2+
RUN apk add --update --no-cache ca-certificates
3+
COPY benchtool /usr/bin/benchtool
4+
EXPOSE 80
5+
ENTRYPOINT [ "/usr/bin/benchtool" ]

cmd/blockscopy/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM golang:1.16.3-stretch as build
1+
FROM golang:1.16.8-stretch as build
22
ARG GOARCH="amd64"
33
COPY . /build_dir
44
WORKDIR /build_dir
55
ENV GOPROXY=https://proxy.golang.org
66
RUN make clean && make blockscopy
77

8-
FROM alpine:3.13
8+
FROM alpine:3.14
99
RUN apk add --update --no-cache ca-certificates
1010
COPY --from=build /build_dir/cmd/blockscopy/blockscopy /usr/bin/blockscopy
1111
EXPOSE 80

cmd/chunktool/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM golang:1.16.3-stretch as build
1+
FROM golang:1.16.8-stretch as build
22
ARG GOARCH="amd64"
33
COPY . /build_dir
44
WORKDIR /build_dir
55
ENV GOPROXY=https://proxy.golang.org
66
RUN make clean && make chunktool
77

8-
FROM alpine:3.13
8+
FROM alpine:3.14
99
RUN apk add --update --no-cache ca-certificates
1010
COPY --from=build /build_dir/cmd/chunktool/chunktool /usr/bin/chunktool
1111
EXPOSE 80

cmd/cortextool/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
FROM golang:1.16.3-stretch as build
1+
FROM golang:1.16.8-stretch as build
22
ARG GOARCH="amd64"
33
COPY . /build_dir
44
WORKDIR /build_dir
55
ENV GOPROXY=https://proxy.golang.org
66
RUN make clean && make cortextool
77

8-
FROM alpine:3.13
8+
FROM alpine:3.14
99
RUN apk add --update --no-cache ca-certificates
1010
COPY --from=build /build_dir/cmd/cortextool/cortextool /usr/bin/cortextool
1111
EXPOSE 80

cmd/cortextool/GR.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM alpine:3.9
1+
FROM alpine:3.14
22
RUN apk add --update --no-cache ca-certificates
33
COPY cortextool /usr/bin/cortextool
44
EXPOSE 80

0 commit comments

Comments
 (0)