Skip to content

Commit

Permalink
ci: have crosscompile reflect release builds (#3071) (#3073)
Browse files Browse the repository at this point in the history
* ci: have crosscompile reflect release builds

* remove support for the embedded UI just for armv6

* Remove "production ready" verbiage

(cherry picked from commit 33ca922)
  • Loading branch information
rfratto authored Feb 23, 2023
1 parent 8163d76 commit 143d112
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 34 deletions.
107 changes: 79 additions & 28 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=amd64 GOARM= make agent
- make generate-ui
- GOOS=linux GOARCH=amd64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agent
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -357,7 +359,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=arm64 GOARM= make agent
- make generate-ui
- GOOS=linux GOARCH=arm64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agent
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -372,7 +376,8 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=arm GOARM=6 make agent
- make generate-ui
- GOOS=linux GOARCH=arm GOARM=6 GO_TAGS="promtail_journal_enabled" make agent
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -387,7 +392,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=arm GOARM=7 make agent
- make generate-ui
- GOOS=linux GOARCH=arm GOARM=7 GO_TAGS="builtinassets promtail_journal_enabled"
make agent
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -402,7 +409,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=ppc64le GOARM= make agent
- make generate-ui
- GOOS=linux GOARCH=ppc64le GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agent
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -417,7 +426,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=darwin GOARCH=amd64 GOARM= make agent
- make generate-ui
- GOOS=darwin GOARCH=amd64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agent
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -432,7 +443,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=darwin GOARCH=arm64 GOARM= make agent
- make generate-ui
- GOOS=darwin GOARCH=arm64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agent
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -447,7 +460,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=windows GOARCH=amd64 GOARM= make agent
- make generate-ui
- GOOS=windows GOARCH=amd64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agent
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -462,7 +477,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=freebsd GOARCH=amd64 GOARM= make agent
- make generate-ui
- GOOS=freebsd GOARCH=amd64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agent
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -477,7 +494,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=amd64 GOARM= make agentctl
- make generate-ui
- GOOS=linux GOARCH=amd64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agentctl
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -492,7 +511,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=arm64 GOARM= make agentctl
- make generate-ui
- GOOS=linux GOARCH=arm64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agentctl
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -507,7 +528,8 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=arm GOARM=6 make agentctl
- make generate-ui
- GOOS=linux GOARCH=arm GOARM=6 GO_TAGS="promtail_journal_enabled" make agentctl
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -522,7 +544,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=arm GOARM=7 make agentctl
- make generate-ui
- GOOS=linux GOARCH=arm GOARM=7 GO_TAGS="builtinassets promtail_journal_enabled"
make agentctl
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -537,7 +561,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=ppc64le GOARM= make agentctl
- make generate-ui
- GOOS=linux GOARCH=ppc64le GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agentctl
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -552,7 +578,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=darwin GOARCH=amd64 GOARM= make agentctl
- make generate-ui
- GOOS=darwin GOARCH=amd64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agentctl
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -567,7 +595,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=darwin GOARCH=arm64 GOARM= make agentctl
- make generate-ui
- GOOS=darwin GOARCH=arm64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agentctl
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -582,7 +612,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=windows GOARCH=amd64 GOARM= make agentctl
- make generate-ui
- GOOS=windows GOARCH=amd64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agentctl
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -597,7 +629,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=freebsd GOARCH=amd64 GOARM= make agentctl
- make generate-ui
- GOOS=freebsd GOARCH=amd64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make agentctl
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -612,7 +646,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=amd64 GOARM= make operator
- make generate-ui
- GOOS=linux GOARCH=amd64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make operator
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -627,7 +663,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=arm64 GOARM= make operator
- make generate-ui
- GOOS=linux GOARCH=arm64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make operator
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -642,7 +680,8 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=arm GOARM=6 make operator
- make generate-ui
- GOOS=linux GOARCH=arm GOARM=6 GO_TAGS="promtail_journal_enabled" make operator
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -657,7 +696,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=arm GOARM=7 make operator
- make generate-ui
- GOOS=linux GOARCH=arm GOARM=7 GO_TAGS="builtinassets promtail_journal_enabled"
make operator
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -672,7 +713,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=linux GOARCH=ppc64le GOARM= make operator
- make generate-ui
- GOOS=linux GOARCH=ppc64le GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make operator
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -687,7 +730,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=darwin GOARCH=amd64 GOARM= make operator
- make generate-ui
- GOOS=darwin GOARCH=amd64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make operator
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -702,7 +747,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=darwin GOARCH=arm64 GOARM= make operator
- make generate-ui
- GOOS=darwin GOARCH=arm64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make operator
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -717,7 +764,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=windows GOARCH=amd64 GOARM= make operator
- make generate-ui
- GOOS=windows GOARCH=amd64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make operator
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand All @@ -732,7 +781,9 @@ platform:
os: linux
steps:
- commands:
- GOOS=freebsd GOARCH=amd64 GOARM= make operator
- make generate-ui
- GOOS=freebsd GOARCH=amd64 GOARM= GO_TAGS="builtinassets promtail_journal_enabled"
make operator
image: grafana/agent-build-image:0.21.0
name: Build
trigger:
Expand Down Expand Up @@ -1151,6 +1202,6 @@ kind: secret
name: gpg_passphrase
---
kind: signature
hmac: 5e85b73dd2e075bffd57cf6fd5d943abcdd72356097b0e18d9a0520d733d7ea0
hmac: 3a13fd175473adb0873959a4e67b7b2787161d9b69af0f1da3bf776671da8ce8

...
11 changes: 9 additions & 2 deletions .drone/pipelines/crosscompile.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ local os_arch_tuples = [
// Linux
{ name: 'Linux amd64', os: 'linux', arch: 'amd64' },
{ name: 'Linux arm64', os: 'linux', arch: 'arm64' },
{ name: 'Linux armv6', os: 'linux', arch: 'arm', arm: '6' },
{ name: 'Linux armv6', os: 'linux', arch: 'arm', arm: '6', tags: 'promtail_journal_enabled' },
{ name: 'Linux armv7', os: 'linux', arch: 'arm', arm: '7' },
{ name: 'Linux ppc64le', os: 'linux', arch: 'ppc64le' },

Expand All @@ -29,12 +29,18 @@ local targets = [
std.flatMap(function(target) (
std.map(function(platform) (
pipelines.linux('Build %s (%s)' % [target, platform.name]) {
local build_tags = (
if 'tags' in platform then platform.tags
else 'builtinassets promtail_journal_enabled'
),

local env = {
GOOS: platform.os,
GOARCH: platform.arch,
GOARM: if 'arm' in platform then platform.arm else '',

target: target,
tags: build_tags,
},

trigger: {
Expand All @@ -44,7 +50,8 @@ std.flatMap(function(target) (
name: 'Build',
image: build_image.linux,
commands: [
'GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s make %(target)s' % env,
'make generate-ui',
'GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s GO_TAGS="%(tags)s" make %(target)s' % env,
],
}],
}
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ This document contains a historical list of changes between releases. Only
changes that impact end-user behavior are listed; changes to documentation or
internal API changes are not present.

> **NOTE**: As of v0.32.0, builds for 32-bit ARMv6 currently don't support the
> embedded Flow UI. The Flow UI will return to this target as soon as possible.
Main (unreleased)
-----------------

Expand All @@ -15,6 +18,9 @@ v0.32.0-rc.0 (2023-02-23)

### Breaking changes

- Support for the embedded Flow UI for 32-bit ARMv6 builds is temporarily
removed. (@rfratto)

- Node Exporter configuration options changed to align with new upstream version (@Thor77):

- `diskstats_ignored_devices` is now `diskstats_device_exclude` in agent configuration.
Expand Down Expand Up @@ -142,7 +148,7 @@ v0.32.0-rc.0 (2023-02-23)

- Use Go 1.20 for builds. (@rfratto)

- Grafana Agent Flow is now considered production ready. A subset of Flow
- The beta label from Grafana Agent Flow has been removed. A subset of Flow
components are still marked as beta or experimental:

- `loki.echo` is explicitly marked as beta.
Expand Down
5 changes: 2 additions & 3 deletions tools/make/packaging.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ dist/grafana-agent-linux-arm64: GOARCH := arm64
dist/grafana-agent-linux-arm64: generate-ui
$(PACKAGING_VARS) AGENT_BINARY=$@ $(MAKE) -f $(PARENT_MAKEFILE) agent

dist/grafana-agent-linux-armv6: GO_TAGS += builtinassets promtail_journal_enabled
dist/grafana-agent-linux-armv6: GO_TAGS += promtail_journal_enabled
dist/grafana-agent-linux-armv6: GOOS := linux
dist/grafana-agent-linux-armv6: GOARCH := arm
dist/grafana-agent-linux-armv6: GOARM := 6
dist/grafana-agent-linux-armv6: generate-ui
dist/grafana-agent-linux-armv6:
$(PACKAGING_VARS) AGENT_BINARY=$@ $(MAKE) -f $(PARENT_MAKEFILE) agent

dist/grafana-agent-linux-armv7: GO_TAGS += builtinassets promtail_journal_enabled
Expand Down Expand Up @@ -142,7 +142,6 @@ dist/grafana-agentctl-windows-amd64.exe: GOARCH := amd64
dist/grafana-agentctl-windows-amd64.exe:
$(PACKAGING_VARS) AGENTCTL_BINARY=$@ $(MAKE) -f $(PARENT_MAKEFILE) agentctl

dist/grafana-agentctl-freebsd-amd64: GO_TAGS += builtinassets
dist/grafana-agentctl-freebsd-amd64: GOOS := freebsd
dist/grafana-agentctl-freebsd-amd64: GOARCH := amd64
dist/grafana-agentctl-freebsd-amd64:
Expand Down

0 comments on commit 143d112

Please sign in to comment.