Skip to content

Commit

Permalink
Update goreleaser to enable weekly builds (#2141)
Browse files Browse the repository at this point in the history
* Update goreleaser to enable weekly builds

* Add tag filter for ebpf/*
  • Loading branch information
simonswine authored Jul 20, 2023
1 parent 9cdc353 commit ce0db65
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/weekly-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ jobs:
docker manifest create "grafana/phlare:${WEEKLY_IMAGE_TAG}" "${IMAGE_AMMENDS[@]}"
docker manifest push "grafana/phlare:${WEEKLY_IMAGE_TAG}"
- name: Push git tag for weekly release
run: git push https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/phlare.git "${WEEKLY_IMAGE_TAG}"
run: git push https://grafanabot:${{ secrets.GH_BOT_ACCESS_TOKEN }}@github.com/grafana/pyroscope.git "${WEEKLY_IMAGE_TAG}"
52 changes: 26 additions & 26 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
project_name: phlare
project_name: phlare # TODO: Change when we change the image repository
before:
hooks:
# This hook ensures that goreleaser uses the correct go version for a Phlare release
Expand All @@ -16,7 +16,7 @@ builds:
goarm:
- "6"
- "7"
main: ./cmd/phlare
main: ./cmd/pyroscope
mod_timestamp: "{{ .CommitTimestamp }}"
flags:
- -trimpath
Expand All @@ -26,22 +26,22 @@ builds:
ldflags:
- >
-extldflags "-static" -s -w
-X "github.com/grafana/phlare/pkg/util/build.Branch={{ .Branch }}"
-X "github.com/grafana/phlare/pkg/util/build.Version={{ .Version }}"
-X "github.com/grafana/phlare/pkg/util/build.Revision={{ .ShortCommit }}"
-X "github.com/grafana/phlare/pkg/util/build.BuildDate={{ .CommitDate }}"
id: phlare
-X "github.com/grafana/pyroscope/pkg/util/build.Branch={{ .Branch }}"
-X "github.com/grafana/pyroscope/pkg/util/build.Version={{ .Version }}"
-X "github.com/grafana/pyroscope/pkg/util/build.Revision={{ .ShortCommit }}"
-X "github.com/grafana/pyroscope/pkg/util/build.BuildDate={{ .CommitDate }}"
id: pyroscope
- env:
- CGO_ENABLED=0
tags:
- netgo
ldflags:
- >
-extldflags "-static" -s -w
-X "github.com/grafana/phlare/pkg/util/build.Branch={{ .Branch }}"
-X "github.com/grafana/phlare/pkg/util/build.Version={{ .Version }}"
-X "github.com/grafana/phlare/pkg/util/build.Revision={{ .ShortCommit }}"
-X "github.com/grafana/phlare/pkg/util/build.BuildDate={{ .CommitDate }}"
-X "github.com/grafana/pyroscope/pkg/util/build.Branch={{ .Branch }}"
-X "github.com/grafana/pyroscope/pkg/util/build.Version={{ .Version }}"
-X "github.com/grafana/pyroscope/pkg/util/build.Revision={{ .ShortCommit }}"
-X "github.com/grafana/pyroscope/pkg/util/build.BuildDate={{ .CommitDate }}"
goos:
- linux
- windows
Expand All @@ -66,12 +66,12 @@ dockers:
- use: buildx
goos: linux
goarch: amd64
dockerfile: ./cmd/phlare/Dockerfile
dockerfile: ./cmd/pyroscope/Dockerfile
ids:
- phlare
- pyroscope
- profilecli
extra_files:
- cmd/phlare/phlare.yaml
- cmd/pyroscope/pyroscope.yaml
image_templates:
- "grafana/{{ .ProjectName }}:{{ .Version }}-amd64"
- "grafana/{{ .ProjectName }}:latest-amd64"
Expand All @@ -85,8 +85,8 @@ dockers:
goos: linux
goarch: arm64
extra_files:
- cmd/phlare/phlare.yaml
dockerfile: ./cmd/phlare/Dockerfile
- cmd/pyroscope/pyroscope.yaml
dockerfile: ./cmd/pyroscope/Dockerfile
image_templates:
- "grafana/{{ .ProjectName }}:{{ .Version }}-arm64v8"
- "grafana/{{ .ProjectName }}:latest-arm64v8"
Expand All @@ -101,8 +101,8 @@ dockers:
goarch: arm
goarm: "6"
extra_files:
- cmd/phlare/phlare.yaml
dockerfile: ./cmd/phlare/Dockerfile
- cmd/pyroscope/pyroscope.yaml
dockerfile: ./cmd/pyroscope/Dockerfile
image_templates:
- "grafana/{{ .ProjectName }}:{{ .Version }}-armv6"
- "grafana/{{ .ProjectName }}:latest-armv6"
Expand All @@ -116,9 +116,9 @@ dockers:
goos: linux
goarch: arm
goarm: "7"
dockerfile: ./cmd/phlare/Dockerfile
dockerfile: ./cmd/pyroscope/Dockerfile
extra_files:
- cmd/phlare/phlare.yaml
- cmd/pyroscope/pyroscope.yaml
image_templates:
- "grafana/{{ .ProjectName }}:{{ .Version }}-armv7"
- "grafana/{{ .ProjectName }}:latest-armv7"
Expand All @@ -143,9 +143,9 @@ docker_manifests:
- grafana/{{ .ProjectName }}:latest-armv6
- grafana/{{ .ProjectName }}:latest-armv7
archives:
- id: phlare
- id: pyroscope
builds:
- phlare
- pyroscope
- id: profilecli
name_template: 'profilecli_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}'
builds:
Expand All @@ -170,9 +170,9 @@ release:
You can reach out to the team using:
- [Slack](https://grafana.slack.com/archives/C047CCW6YM8)
- [Github Discussions](https://github.com/grafana/phlare/discussions)
- [Github Issues](https://github.com/grafana/phlare/issues)
- [Mailing List](https://groups.google.com/g/phlare-team)
- [Github Discussions](https://github.com/grafana/pyroscope/discussions)
- [Github Issues](https://github.com/grafana/pyroscope/issues)
- [Mailing List](https://groups.google.com/g/pyroscope-team)
## Docker Images
Expand All @@ -183,7 +183,7 @@ release:
```
ids:
- phlare
- pyroscope
- profilecli
# milestones:
# - close: true
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ frontend/deps:
.PHONY: release
release/prereq: $(BIN)/goreleaser ## Ensure release pre requesites are met
# remove local git tags coming from helm chart release
git tag -d $(shell git tag -l "phlare-*" "api/*")
git tag -d $(shell git tag -l "phlare-*" "api/*" "ebpf/*" "@pyroscope*")
# ensure there is a docker cli command
@which docker || { apt-get update && apt-get install -y docker.io; }
@docker info > /dev/null
Expand Down

0 comments on commit ce0db65

Please sign in to comment.