Skip to content

Commit

Permalink
Pass correct GOOS and GOARCH on to package builders in CI. (netdata#1…
Browse files Browse the repository at this point in the history
…8717)

* Pass correct GOOS and GOARCH on to package builders in CI.

This ensures that they don’t pick up the host CPU and build for that
instead, because apparently Go looks at the host CPU instead of itself
to decide what the default build target is, so if you’re running a
32-bit build of Go on a 64-bit kernel, you get 64-bit binaries by
default...

* Fix typo in platform name.
  • Loading branch information
Ferroin authored Oct 8, 2024
1 parent ce4a911 commit 44b659f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/data/distros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ platform_map: # map packaging architectures to docker platforms
arm64: linux/arm64/v8
armhf: linux/arm/v7
armhfp: linux/arm/v7
i386: linux/i386
i386: linux/386
x86_64: linux/amd64
arch_order: # sort order for per-architecture jobs in CI
- amd64
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,10 @@ jobs:
shell: bash
run: |
docker run --security-opt seccomp=unconfined -e DISABLE_TELEMETRY=1 -e VERSION=${{ needs.version-check.outputs.version }} \
-e ENABLE_SENTRY=${{ matrix.bundle_sentry }} -e RELEASE_PIPELINE=${{ env.RELEASE_PIPELINE }} \
-e BUILD_DESTINATION=${{ matrix.distro }}${{ matrix.version }}_${{ matrix.arch }} -e UPLOAD_SENTRY=${{ env.UPLOAD_SENTRY }} \
-e SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_CLI_TOKEN }} -e NETDATA_SENTRY_DSN=${{ secrets.SENTRY_DSN }} \
-e ENABLE_SENTRY=${{ matrix.bundle_sentry }} -e RELEASE_PIPELINE=${{ env.RELEASE_PIPELINE }} \
-e BUILD_DESTINATION=${{ matrix.distro }}${{ matrix.version }}_${{ matrix.arch }} -e UPLOAD_SENTRY=${{ env.UPLOAD_SENTRY }} \
-e SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_CLI_TOKEN }} -e NETDATA_SENTRY_DSN=${{ secrets.SENTRY_DSN }} \
-e GOOS=$(echo ${{ matrix.platform }} | cut -f 1 -d '/') -e GOARCH=$(echo ${{ matrix.platform }} | cut -f 2 -d '/') \
--platform=${{ matrix.platform }} -v "$PWD":/netdata netdata/package-builders:${{ matrix.distro }}${{ matrix.version }}-${{ matrix.builder_rev }}
- name: Save Packages
id: artifacts
Expand Down

0 comments on commit 44b659f

Please sign in to comment.