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 CRT builds from the releng
branch.
  • Loading branch information
dekimsey committed Jan 3, 2024
1 parent 378a83e commit e6dc081
Show file tree
Hide file tree
Showing 3 changed files with 10 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.
```
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,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 +186,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 +211,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 +236,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
1 change: 1 addition & 0 deletions .release/ci.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ project "consul-k8s" {
release_branches = [
"main",
"release/**",
"releng/**",
]
}
}
Expand Down

0 comments on commit e6dc081

Please sign in to comment.