diff --git a/.drone/drone.yml b/.drone/drone.yml index 086ed83ac2..37aefaf779 100644 --- a/.drone/drone.yml +++ b/.drone/drone.yml @@ -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 @@ -833,8 +850,3 @@ get: path: infra/data/ci/github/updater-app kind: secret name: updater_private_key ---- -kind: signature -hmac: ee269482e125ef982b0dffcf21ded182eb20960f97adf0513610fac49a1ab775 - -... diff --git a/.drone/pipelines/crosscompile.jsonnet b/.drone/pipelines/crosscompile.jsonnet index e480992153..89f1a247e9 100644 --- a/.drone/pipelines/crosscompile.jsonnet +++ b/.drone/pipelines/crosscompile.jsonnet @@ -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' }, diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ba68765a5..ea4a5aad30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/tools/ci/docker-containers b/tools/ci/docker-containers index 8d2a78d93c..82c8d95fca 100755 --- a/tools/ci/docker-containers +++ b/tools/ci/docker-containers @@ -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 diff --git a/tools/make/packaging.mk b/tools/make/packaging.mk index efa518d095..b5becab3b2 100644 --- a/tools/make/packaging.mk +++ b/tools/make/packaging.mk @@ -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 @@ -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 @@ -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 #