From ba4e8cc9f9ff57e5a0bd4bf93ab44ec9c7ece47d Mon Sep 17 00:00:00 2001 From: Eric Wyles <23637493+ericwyles@users.noreply.github.com> Date: Mon, 17 Jun 2024 10:09:09 -0500 Subject: [PATCH] chore: add testing on arm64 architecture using qemu (#95) ## 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 --- .github/workflows/tag-and-release.yaml | 6 +++++- README.md | 3 +++ tests/mattermost.test.ts | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tag-and-release.yaml b/.github/workflows/tag-and-release.yaml index 1a4c522d..85725ee4 100644 --- a/.github/workflows/tag-and-release.yaml +++ b/.github/workflows/tag-and-release.yaml @@ -29,7 +29,7 @@ jobs: strategy: matrix: flavor: [upstream, registry1] - architecture: [amd64] + architecture: [amd64, arm64] name: Publish ${{ matrix.flavor }} ${{ matrix.architecture }} permissions: @@ -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 }} diff --git a/README.md b/README.md index 595380ec..0fd3ceb0 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/tests/mattermost.test.ts b/tests/mattermost.test.ts index 7bd30a21..37ead33e 100644 --- a/tests/mattermost.test.ts +++ b/tests/mattermost.test.ts @@ -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 }) => { @@ -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 }); });