Skip to content

Commit

Permalink
Package arm64/arm/386 architectures too
Browse files Browse the repository at this point in the history
During the CRT on-boarding, packaging for other Linux architectures (arm64,
arm, and 386) was not enabled. This change adds packaging support for those
architectures.

See #1132.
Related to hashicorp/releng-support#178.

These packages have not been tested on their respective platforms.  But given
we are already shipping binaries and docker images for them, I have high
confidence it'll Just Work. I still recommend testing them though :)!

To make future support a bit easier, I've enabled the build workflow from
releng prefixed branches.
  • Loading branch information
dekimsey committed Feb 7, 2024
1 parent 50226e2 commit ce23528
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .changelog/3428.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:note
build: Releases will now also be available as Debian and RPM packages for ARM64, ARM, and 386.
```
14 changes: 8 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
- main
# Push events to branches matching refs/heads/release/**
- "release/**"
# Build on releng branches for testing build pipelines
- "releng/**"

env:
PKG_NAME: "consul-k8s"
Expand Down Expand Up @@ -171,7 +173,7 @@ jobs:
path: ${{ matrix.component}}/out/${{ matrix.pkg_name }}_${{ needs.get-product-version.outputs.product-version }}${{ matrix.fips }}_${{ matrix.goos }}_${{ matrix.goarch }}.zip

- name: Package rpm and deb files
if: ${{ matrix.goos == 'linux' && matrix.component == 'cli' && matrix.goarch == 'amd64'}}
if: ${{ matrix.goos == 'linux' && matrix.component == 'cli' }}
uses: hashicorp/actions-packaging-linux@v1
with:
name: consul-k8s${{ matrix.pkg_suffix }}
Expand All @@ -186,13 +188,13 @@ jobs:
rpm_depends: "openssl"

- name: Set package names
if: ${{ matrix.goos == 'linux' && matrix.component == 'cli' && matrix.goarch == 'amd64'}}
if: ${{ matrix.goos == 'linux' && matrix.component == 'cli' }}
run: |
echo "RPM_PACKAGE=$(basename out/*.rpm)" >> $GITHUB_ENV
echo "DEB_PACKAGE=$(basename out/*.deb)" >> $GITHUB_ENV
- name: Test rpm package
if: ${{ matrix.goos == 'linux' && matrix.component == 'cli' && matrix.goarch == 'amd64'}}
if: ${{ matrix.goos == 'linux' && matrix.component == 'cli' }}
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
with:
image: registry.access.redhat.com/ubi9/ubi:latest
Expand All @@ -211,13 +213,13 @@ jobs:
- name: Upload rpm package
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: ${{ matrix.goos == 'linux' && matrix.component == 'cli' && matrix.goarch == 'amd64'}}
if: ${{ matrix.goos == 'linux' && matrix.component == 'cli' }}
with:
name: ${{ env.RPM_PACKAGE }}
path: out/${{ env.RPM_PACKAGE }}

- name: Test debian package
if: ${{ matrix.goos == 'linux' && matrix.component == 'cli' && matrix.goarch == 'amd64'}}
if: ${{ matrix.goos == 'linux' && matrix.component == 'cli' }}
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
with:
image: ubuntu:latest
Expand All @@ -236,7 +238,7 @@ jobs:
- name: Upload debian packages
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: ${{ matrix.goos == 'linux' && matrix.component == 'cli' && matrix.goarch == 'amd64'}}
if: ${{ matrix.goos == 'linux' && matrix.component == 'cli' }}
with:
name: ${{ env.DEB_PACKAGE }}
path: out/${{ env.DEB_PACKAGE }}
Expand Down

0 comments on commit ce23528

Please sign in to comment.