Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Alloy for linux/riscv64 #1526

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions .drone/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,23 @@ trigger:
type: docker
---
kind: pipeline
name: Build alloy (Linux riscv64)
platform:
arch: amd64
os: linux
steps:
- commands:
- make generate-ui
- GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=riscv64 GOARM=
make alloy
image: grafana/alloy-build-image:v0.1.3
name: Build
trigger:
event:
- pull_request
type: docker
---
kind: pipeline
name: Build alloy (macOS Intel)
platform:
arch: amd64
Expand Down Expand Up @@ -833,8 +850,3 @@ get:
path: infra/data/ci/github/updater-app
kind: secret
name: updater_private_key
---
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this should be regenerated by one of the maintainers? 🙈

kind: signature
hmac: ee269482e125ef982b0dffcf21ded182eb20960f97adf0513610fac49a1ab775

...
1 change: 1 addition & 0 deletions .drone/pipelines/crosscompile.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ local os_arch_tuples = [
{ name: 'Linux arm64', os: 'linux', arch: 'arm64' },
{ name: 'Linux ppc64le', os: 'linux', arch: 'ppc64le' },
{ name: 'Linux s390x', os: 'linux', arch: 's390x' },
{ name: 'Linux riscv64', os: 'linux', arch: 'riscv64' },

// Darwin
{ name: 'macOS Intel', os: 'darwin', arch: 'amd64' },
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ internal API changes are not present.
Main (unreleased)
-----------------

### Features

- Build binaries and OCI images for linux/riscv64. (@macabu)

### Enhancements

- Clustering peer resolution through `--cluster.join-addresses` flag has been
Expand Down
2 changes: 1 addition & 1 deletion tools/ci/docker-containers
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ fi

# Build all of our images.

export BUILD_PLATFORMS=linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
export BUILD_PLATFORMS=linux/amd64,linux/arm64,linux/ppc64le,linux/s390x,linux/riscv64
export BUILD_PLATFORMS_BORINGCRYPTO=linux/amd64,linux/arm64

case "$TARGET_CONTAINER" in
Expand Down
18 changes: 17 additions & 1 deletion tools/make/packaging.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ dist/alloy-linux-s390x: GOARCH := s390x
dist/alloy-linux-s390x: generate-ui
$(PACKAGING_VARS) ALLOY_BINARY=$@ "$(MAKE)" -f $(PARENT_MAKEFILE) alloy

dist/alloy-linux-riscv64: GO_TAGS += netgo builtinassets promtail_journal_enabled
dist/alloy-linux-riscv64: GOOS := linux
dist/alloy-linux-riscv64: GOARCH := riscv64
dist/alloy-linux-riscv64: generate-ui
$(PACKAGING_VARS) ALLOY_BINARY=$@ "$(MAKE)" -f $(PARENT_MAKEFILE) alloy

dist/alloy-darwin-amd64: GO_TAGS += netgo builtinassets
dist/alloy-darwin-amd64: GOOS := darwin
dist/alloy-darwin-amd64: GOARCH := amd64
Expand Down Expand Up @@ -167,7 +173,8 @@ ALLOY_PACKAGE_PREFIX := dist/alloy-$(ALLOY_PACKAGE_VERSION)-$(ALLOY_PACKAGE_REL
dist-alloy-packages: dist-alloy-packages-amd64 \
dist-alloy-packages-arm64 \
dist-alloy-packages-ppc64le \
dist-alloy-packages-s390x
dist-alloy-packages-s390x \
dist-alloy-packages-riscv64

.PHONY: dist-alloy-packages-amd64
dist-alloy-packages-amd64: dist/alloy-linux-amd64
Expand Down Expand Up @@ -205,6 +212,15 @@ else
$(call generate_alloy_fpm,rpm,s390x,s390x,$(ALLOY_PACKAGE_PREFIX).s390x.rpm)
endif

.PHONY: dist-alloy-packages-riscv64
dist-alloy-packages-riscv64: dist/alloy-linux-riscv64
ifeq ($(USE_CONTAINER),1)
$(RERUN_IN_CONTAINER)
else
$(call generate_alloy_fpm,deb,riscv64,riscv64,$(ALLOY_PACKAGE_PREFIX).riscv64.deb)
$(call generate_alloy_fpm,rpm,riscv64,riscv64,$(ALLOY_PACKAGE_PREFIX).riscv64.rpm)
endif

#
# Windows installer
#
Expand Down
Loading