Skip to content

Commit b971cea

Browse files
committed
ci: switch Buildkite builds to mise
1 parent 16256d5 commit b971cea

8 files changed

Lines changed: 86 additions & 102 deletions

File tree

.buildkite/Dockerfile

Lines changed: 0 additions & 5 deletions
This file was deleted.

.buildkite/docker-compose.yaml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.buildkite/pipeline.release.yml

Lines changed: 18 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
agents:
22
queue: hosted
33

4+
x-cache-env: &cache_env
5+
GOCACHE: .buildkite/cache-volume/go/build
6+
GOMODCACHE: .buildkite/cache-volume/go/pkg/mod
7+
8+
x-mise-plugin: &mise_plugin
9+
buildkite-plugins/mise#v1.1.0: ~
10+
11+
cache: ".buildkite/cache-volume"
12+
413
steps:
514
- label: ":terminal: build ({{matrix}})"
615
matrix:
@@ -12,49 +21,30 @@ steps:
1221
secrets:
1322
- POSTHOG_API_KEY
1423
- OAUTH_CLIENT_ID
24+
env:
25+
<<: *cache_env
26+
GOOS: "{{matrix}}"
27+
command: ".buildkite/release.sh release --clean --split"
1528
plugins:
16-
- docker-compose#v5.12.1:
17-
command:
18-
- .buildkite/release.sh
19-
- release
20-
- --clean
21-
- --split
22-
config: .buildkite/docker-compose.yaml
23-
entrypoint: /bin/sh
24-
env:
25-
- GOOS={{matrix}}
26-
- POSTHOG_API_KEY
27-
- OAUTH_CLIENT_ID
28-
mount-buildkite-agent: true
29-
run: goreleaser
30-
shell: false
31-
tty: true
29+
- *mise_plugin
3230

3331
- wait
3432

3533
- label: ":rocket: :package: upload packages ({{matrix}})"
3634
matrix:
3735
- "deb"
3836
- "rpm"
37+
command: '.buildkite/upload-packages.sh "{{matrix}}"'
3938
plugins:
4039
- artifacts#v1.9.4:
4140
download:
4241
- dist/linux/*
43-
- docker-compose#v5.12.1:
44-
command:
45-
- .buildkite/upload-packages.sh
46-
- "{{matrix}}"
47-
config: .buildkite/docker-compose.yaml
48-
entrypoint: /bin/sh
49-
mount-buildkite-agent: true
50-
run: goreleaser
51-
shell: false
52-
tty: true
5342

5443
- label: ":rocket: :github: release"
5544
artifact_paths:
5645
- dist/**/*
5746
env:
47+
<<: *cache_env
5848
AWS_REGION: us-east-1
5949
secrets:
6050
- POSTHOG_API_KEY
@@ -74,20 +64,5 @@ steps:
7464
- artifacts#v1.9.4:
7565
download:
7666
- dist/**/*
77-
- docker-compose#v5.12.1:
78-
command:
79-
- .buildkite/release.sh
80-
- continue
81-
- --merge
82-
config: .buildkite/docker-compose.yaml
83-
entrypoint: /bin/sh
84-
env:
85-
- GITHUB_TOKEN
86-
- DOCKERHUB_USER
87-
- DOCKERHUB_PASSWORD
88-
- POSTHOG_API_KEY
89-
- OAUTH_CLIENT_ID
90-
mount-buildkite-agent: true
91-
run: goreleaser
92-
shell: false
93-
tty: true
67+
- *mise_plugin
68+
command: ".buildkite/release.sh continue --merge"

.buildkite/pipeline.yml

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,35 @@
11
agents:
22
queue: hosted
33

4+
x-cache-env: &cache_env
5+
GOCACHE: .buildkite/cache-volume/go/build
6+
GOMODCACHE: .buildkite/cache-volume/go/pkg/mod
7+
GOLANGCI_LINT_CACHE: .buildkite/cache-volume/golangci-lint
8+
9+
x-mise-plugin: &mise_plugin
10+
buildkite-plugins/mise#v1.1.0: ~
11+
12+
cache: ".buildkite/cache-volume"
13+
414
steps:
515
- name: ":golangci-lint: lint"
6-
command: golangci-lint run --verbose --timeout 3m
16+
command: mise run lint
17+
env:
18+
<<: *cache_env
719
plugins:
8-
- docker-compose#v5.12.1:
9-
config: .buildkite/docker-compose.yaml
10-
run: golangci-lint
11-
tty: true
20+
- *mise_plugin
1221

1322
- name: ":go: test"
1423
artifact_paths:
1524
- cover-tree.svg
25+
env:
26+
<<: *cache_env
1627
commands:
1728
- go test -coverprofile cover.out ./...
18-
- go run github.com/nikolaydubina/go-cover-treemap@latest -coverprofile cover.out > cover-tree.svg
29+
- go run github.com/nikolaydubina/go-cover-treemap@v1.5.1 -coverprofile cover.out > cover-tree.svg
1930
- echo '<details><summary>Coverage tree map</summary><img src="artifact://cover-tree.svg" alt="Test coverage tree map" width="70%"></details>' | buildkite-agent annotate --style "info"
2031
plugins:
21-
- docker-compose#v5.12.1:
22-
config: .buildkite/docker-compose.yaml
23-
run: golangci-lint
24-
tty: true
25-
mount-buildkite-agent: true
32+
- *mise_plugin
2633

2734
- wait
2835

@@ -36,24 +43,12 @@ steps:
3643
secrets:
3744
- POSTHOG_API_KEY
3845
- OAUTH_CLIENT_ID
46+
env:
47+
<<: *cache_env
48+
GOOS: "{{matrix}}"
49+
command: ".buildkite/release.sh release --clean --snapshot --split"
3950
plugins:
40-
- docker-compose#v5.12.1:
41-
command:
42-
- .buildkite/release.sh
43-
- release
44-
- --clean
45-
- --snapshot
46-
- --split
47-
config: .buildkite/docker-compose.yaml
48-
entrypoint: /bin/sh
49-
env:
50-
- GOOS={{matrix}}
51-
- POSTHOG_API_KEY
52-
- OAUTH_CLIENT_ID
53-
mount-buildkite-agent: true
54-
run: goreleaser
55-
shell: false
56-
tty: true
51+
- *mise_plugin
5752

5853
- input: ":package: Create a release?"
5954
prompt: "Select the release type"

CONTRIBUTING.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ To get started with contributing, please follow these steps:
1616
* Lint with `mise run lint`.
1717
* Make sure the tests pass with `mise run test`.
1818
* Run `mise run generate` after GraphQL changes. If you need to refresh `schema.graphql`, set `BUILDKITE_GRAPHQL_TOKEN` first.
19-
* If you prefer the containerized lint setup, `docker-compose -f .buildkite/docker-compose.yaml run golangci-lint golangci-lint run` still works.
2019
7. Commit your changes and push them to your forked repository.
2120
8. Submit a pull request with a detailed description of your changes and links to any relevant issues.
2221

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,6 @@ mise run generate
4343
go run main.go --help
4444
```
4545

46-
`mise.toml` pins Go `1.26.1` to match the current release build image. The
47-
module itself remains compatible with Go `1.25.0` as declared in `go.mod`.
46+
`mise.toml` pins the shared toolchain, including the release helpers used in
47+
CI. The module itself remains compatible with Go `1.25.0` as declared in
48+
`go.mod`.

mise.lock

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[[tools."aqua:mvdan/gofumpt"]]
2+
version = "0.9.2"
3+
backend = "aqua:mvdan/gofumpt"
4+
"platforms.linux-x64" = { checksum = "sha256:72cf61b12fef91eab6df6db4a4284f30616b5ead330112e28a1fa1cb15e57339", url = "https://github.com/mvdan/gofumpt/releases/download/v0.9.2/gofumpt_v0.9.2_linux_amd64"}
5+
"platforms.macos-arm64" = { checksum = "sha256:c241fb742599a6cb0563d7377f59def65d451b23dd718dbc6ddf4ab5e695e8f1", url = "https://github.com/mvdan/gofumpt/releases/download/v0.9.2/gofumpt_v0.9.2_darwin_arm64"}
6+
7+
[[tools."github:goreleaser/goreleaser-pro"]]
8+
version = "2.14.3"
9+
backend = "github:goreleaser/goreleaser-pro"
10+
"platforms.linux-x64" = { checksum = "sha256:a6a7ba86950db98b1e7d18ac189bf43237645f9ef5ca89a66a56308c45f29b73", url = "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.14.3/goreleaser-pro_Linux_x86_64.tar.gz", url_api = "https://api.github.com/repos/goreleaser/goreleaser-pro/releases/assets/370146679"}
11+
"platforms.macos-arm64" = { checksum = "sha256:c616cb4dd73c1d49f41dd23160a7b5a8092e45e40735f98fc02173611a8dfcbb", url = "https://github.com/goreleaser/goreleaser-pro/releases/download/v2.14.3/goreleaser-pro_Darwin_arm64.tar.gz", url_api = "https://api.github.com/repos/goreleaser/goreleaser-pro/releases/assets/370146635"}
12+
13+
[[tools.go]]
14+
version = "1.26.1"
15+
backend = "core:go"
16+
"platforms.linux-x64" = { checksum = "sha256:031f088e5d955bab8657ede27ad4e3bc5b7c1ba281f05f245bcc304f327c987a", url = "https://dl.google.com/go/go1.26.1.linux-amd64.tar.gz"}
17+
"platforms.macos-arm64" = { checksum = "sha256:353df43a7811ce284c8938b5f3c7df40b7bfb6f56cb165b150bc40b5e2dd541f", url = "https://dl.google.com/go/go1.26.1.darwin-arm64.tar.gz"}
18+
19+
[[tools.golangci-lint]]
20+
version = "2.11.3"
21+
backend = "aqua:golangci/golangci-lint"
22+
"platforms.linux-x64" = { checksum = "sha256:87bb8cddbcc825d5778b64e8a91b46c0526b247f4e2f2904dea74ec7450475d1", url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.3/golangci-lint-2.11.3-linux-amd64.tar.gz"}
23+
"platforms.macos-arm64" = { checksum = "sha256:30ee39979c516b9d1adca289a3f93429d130c4c0fda5e57d637850894221f6cc", url = "https://github.com/golangci/golangci-lint/releases/download/v2.11.3/golangci-lint-2.11.3-darwin-arm64.tar.gz"}
24+
25+
[[tools.ko]]
26+
version = "0.18.1"
27+
backend = "aqua:ko-build/ko"
28+
"platforms.linux-x64" = { checksum = "sha256:048ab11818089a43b7b74bc554494a79a3fd0d9822c061142e5cd3cf8b30cb27", url = "https://github.com/ko-build/ko/releases/download/v0.18.1/ko_0.18.1_Linux_x86_64.tar.gz"}
29+
"platforms.macos-arm64" = { checksum = "sha256:752a639e0fbc013a35a43974b5ed87e7008bc2aee4952dfd2cc19f0013205492", url = "https://github.com/ko-build/ko/releases/download/v0.18.1/ko_0.18.1_Darwin_arm64.tar.gz"}
30+
31+
[[tools.lefthook]]
32+
version = "2.1.4"
33+
backend = "aqua:evilmartians/lefthook"
34+
"platforms.linux-x64" = { checksum = "sha256:991a11fb98c853dbecf7de3fe7f4b5648872f4279ac2b50ef3302f0a058c99bd", url = "https://github.com/evilmartians/lefthook/releases/download/v2.1.4/lefthook_2.1.4_Linux_x86_64.gz"}
35+
"platforms.macos-arm64" = { checksum = "sha256:41fa330710344f66683edb2ee19dfd531e9469bebf7c89ef8e201263565c12ad", url = "https://github.com/evilmartians/lefthook/releases/download/v2.1.4/lefthook_2.1.4_MacOS_arm64.gz"}

mise.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
# Pinned local toolchain for contributors. The Go version matches the
2-
# repository's current release build image; the module minimum stays in go.mod.
2+
# CI and release toolchain; the module minimum stays in go.mod.
3+
[settings]
4+
experimental = true
5+
lockfile = true
6+
37
[tools]
48
go = "1.26.1"
59
golangci-lint = "2.11.3"
610
lefthook = "2.1.4"
711
"aqua:mvdan/gofumpt" = "0.9.2"
8-
"aqua:goreleaser/goreleaser" = "2.14.3"
12+
"github:goreleaser/goreleaser-pro" = "2.14.3"
13+
ko = "0.18.1"
914

1015
[tasks.format]
1116
description = "Format Go files with gofumpt"

0 commit comments

Comments
 (0)