Skip to content

Commit

Permalink
chore: add testing on arm64 architecture using qemu (#95)
Browse files Browse the repository at this point in the history
## Description

Add arm64 architecture and qemu for running the tests. This allows us to
test and publish arm64 packages even if they still need to contain some
amd64 images.

## Related Issue

Relates to #84 

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Other (security config, docs update, etc)

## Checklist before merging

- [x] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/uds-package-mattermost/blob/main/CONTRIBUTING.md#developer-workflow)
followed
  • Loading branch information
ericwyles committed Jun 17, 2024
1 parent c136830 commit ba4e8cc
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/tag-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
matrix:
flavor: [upstream, registry1]
architecture: [amd64]
architecture: [amd64, arm64]
name: Publish ${{ matrix.flavor }} ${{ matrix.architecture }}

permissions:
Expand All @@ -46,6 +46,10 @@ jobs:
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}

- name: Set up QEMU
if: ${{ runner.arch == 'ARM64' }}
uses: docker/setup-qemu-action@v3

- name: Publish Package
run: UDS_ARCHITECTURE=${{ matrix.architecture }} uds run -f tasks/publish.yaml package --set FLAVOR=${{ matrix.flavor }}

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

This package is designed for use as part of a [UDS Software Factory](https://github.com/defenseunicorns/uds-software-factory) bundle deployed on [UDS Core](https://github.com/defenseunicorns/uds-core).

> [!IMPORTANT]
> The `arm64` package includes `amd64` images due to lack of availability of `arm64` images from upstream projects at this time. This means you can deploy the `arm64` package on an `arm64` kubernetes cluster, but some of the images contained in the package will require emulation (e.g., qemu or rosetta) to run properly.
> [!TIP]
> To add additional environment variables to Mattermost you can do so by overriding the `extraEnv` key in the `uds-mattermost-config` chart.
> ```yaml
Expand Down
4 changes: 2 additions & 2 deletions tests/mattermost.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ test("send a message", async ({ page }) => {
await page.goto('/unicorns/channels/town-square');

const el = page.locator(`#post_${post.id}`);
await expect(el).toContainText(post.message);
await expect(el).toContainText(post.message, { timeout: 60_000 });
});

test("send a message with attachment", async ({ page }) => {
Expand Down Expand Up @@ -99,6 +99,6 @@ test("send a message with attachment", async ({ page }) => {
await page.goto('/unicorns/channels/town-square');

const el = page.locator(`#post_${post.id}`);
await expect(el).toContainText(post.message);
await expect(el).toContainText(post.message, { timeout: 60_000 });

});

0 comments on commit ba4e8cc

Please sign in to comment.