Skip to content

Commit

Permalink
goreleaser: download sm-k6 binary from grafana/xk6-sm
Browse files Browse the repository at this point in the history
  • Loading branch information
nadiamoe committed Oct 30, 2024
1 parent 2c4b3ad commit 3a17bc3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
"fileMatch": [
"Dockerfile",
"internal/prober/multihttp/script_test.go",
".goreleaser.yaml"
],
"matchStrings": [
"https://github.com/grafana/xk6-sm/releases/download/(?<currentValue>[^/]+)/"
Expand Down
13 changes: 11 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ builds:
- goos: darwin
goarch: arm
gobinary: scripts/package/goreleaser-build
hooks:
post:
# Download sm-k6 from grafana/sm-k6 repo.
# Renovate updates this URL.
# Folded block scalar converts newlines into spaces, no need to escape them.
- >-
wget
https://github.com/grafana/xk6-sm/releases/download/v0.0.4/sm-k6-{{ .Os }}-{{ .Arch }}
-O
dist/sm-k6-{{ .Os }}-{{ .Arch }}
#sboms:
# - artifacts: archive
archives:
Expand Down Expand Up @@ -52,9 +62,8 @@ nfpms:
type: 'config|noreplace'
- src: ./scripts/package/config/systemd/synthetic-monitoring-agent.service
dst: /etc/systemd/system/synthetic-monitoring-agent.service

# Copy k6 as sm-k6 to prevent clashing with k6 if it's installed.
- src: ./dist/synthetic-monitoring-agent_{{.Os}}_{{.Arch}}{{ with .Amd64 }}_{{ . }}{{ end}}/k6
- src: ./dist/sm-k6-{{ .Os }}-{{ .Arch }}
dst: /usr/bin/sm-k6
rpm:
signature:
Expand Down

0 comments on commit 3a17bc3

Please sign in to comment.