Skip to content

Commit

Permalink
Merge pull request #30 from defenseunicorns/29-ewyles-refactor-zarf-c…
Browse files Browse the repository at this point in the history
…onfig

chore: refactor to common zarf config and values files
  • Loading branch information
ericwyles authored Mar 5, 2024
2 parents 593d7db + a6028c0 commit d52c96c
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 79 deletions.
25 changes: 0 additions & 25 deletions .github/actions/setup/action.yaml

This file was deleted.

27 changes: 4 additions & 23 deletions .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,9 @@ name: Metadata
on:
pull_request:
branches: [main]
types: [opened, edited, synchronize]
types: [milestoned, opened, edited, synchronize]

jobs:
title_check:
runs-on: ubuntu-latest
name: Validate PR Title
permissions:
pull-requests: read

steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2

- name: Install commitlint
run: |
npm install --save-dev @commitlint/[email protected]
npm install --save-dev @commitlint/[email protected]
- name: Lint PR title
run: echo "${{ github.event.pull_request.title }}" | npx commitlint
validate:
name: Validate
uses: defenseunicorns/uds-common/.github/workflows/commitlint.yaml@417b9c2bc088f664c616c9929a2b3ce448d251f7
4 changes: 2 additions & 2 deletions .github/workflows/tag-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Environment setup
uses: ./.github/actions/setup
uses: defenseunicorns/uds-common/.github/actions/setup@417b9c2bc088f664c616c9929a2b3ce448d251f7

- name: Iron Bank Login
run: zarf tools registry login -u "${{secrets.IRON_BANK_ROBOT_USERNAME}}" -p "${{secrets.IRON_BANK_ROBOT_PASSWORD}}" registry1.dso.mil
run: uds zarf tools registry login -u "${{secrets.IRON_BANK_ROBOT_USERNAME}}" -p "${{secrets.IRON_BANK_ROBOT_PASSWORD}}" registry1.dso.mil

- name: Login to GHCR
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Environment setup
uses: ./.github/actions/setup
uses: defenseunicorns/uds-common/.github/actions/setup@417b9c2bc088f664c616c9929a2b3ce448d251f7

- name: Iron Bank Login
run: zarf tools registry login -u "${{secrets.IRON_BANK_ROBOT_USERNAME}}" -p "${{secrets.IRON_BANK_ROBOT_PASSWORD}}" registry1.dso.mil
run: uds zarf tools registry login -u "${{secrets.IRON_BANK_ROBOT_USERNAME}}" -p "${{secrets.IRON_BANK_ROBOT_PASSWORD}}" registry1.dso.mil

- name: Create test bundle
run: uds run create-test-bundle --set FLAVOR=${{ matrix.flavor }}
Expand Down
23 changes: 23 additions & 0 deletions common/zarf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/zarf/main/zarf.schema.json
kind: ZarfPackageConfig
metadata:
name: mattermost-common
description: "UDS Mattermost Common Package"

components:
- name: mattermost
required: true
charts:
- name: uds-mattermost-config
namespace: mattermost
version: 0.1.0
localPath: ../chart
valuesFiles:
- ../values/config-values.yaml
- name: mattermost-enterprise-edition
namespace: mattermost
url: https://helm.mattermost.com
gitPath: chart
version: 2.6.43
valuesFiles:
- ../values/common-values.yaml
4 changes: 2 additions & 2 deletions tasks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
includes:
- cleanup: ./tasks/cleanup.yaml
- create: ./tasks/create.yaml
- deploy: https://raw.githubusercontent.com/defenseunicorns/uds-common-tasks/v0.1.4/tasks/deploy.yaml
- setup: https://raw.githubusercontent.com/defenseunicorns/uds-common-tasks/v0.1.4/tasks/setup.yaml
- deploy: https://raw.githubusercontent.com/defenseunicorns/uds-common-tasks/v0.2.1/tasks/deploy.yaml
- setup: https://raw.githubusercontent.com/defenseunicorns/uds-common-tasks/v0.2.1/tasks/setup.yaml
- test: ./tasks/test.yaml

tasks:
Expand Down
4 changes: 2 additions & 2 deletions tasks/create.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
includes:
- create: https://raw.githubusercontent.com/defenseunicorns/uds-common-tasks/v0.1.4/tasks/create.yaml
- create: https://raw.githubusercontent.com/defenseunicorns/uds-common-tasks/v0.2.1/tasks/create.yaml

tasks:
- name: mattermost-test-bundle
Expand All @@ -17,4 +17,4 @@ tasks:
- name: dependency-package
description: Create the Dependency Zarf Package
actions:
- cmd: zarf package create src/dev-secrets/ --confirm --no-progress --architecture=${UDS_ARCH}
- cmd: uds zarf package create src/dev-secrets/ --confirm --no-progress --architecture=${UDS_ARCH}
2 changes: 1 addition & 1 deletion tasks/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
includes:
- publish: https://raw.githubusercontent.com/defenseunicorns/uds-common-tasks/v0.1.4/tasks/publish.yaml
- publish: https://raw.githubusercontent.com/defenseunicorns/uds-common-tasks/v0.2.1/tasks/publish.yaml

variables:
- name: TARGET_REPO
Expand Down
File renamed without changes.
26 changes: 4 additions & 22 deletions zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,13 @@ components:
- name: mattermost
required: true
description: "Deploy Mattermost"
import:
path: common
only:
flavor: upstream
charts:
- name: uds-mattermost-config
namespace: mattermost
version: 0.1.0
localPath: chart
valuesFiles:
- values/config-values.yaml
- name: mattermost-enterprise-edition
namespace: mattermost
url: https://helm.mattermost.com
gitPath: chart
version: 2.6.43
valuesFiles:
- values/values.yaml
- values/upstream-values.yaml
images:
- appropriate/curl:latest
Expand All @@ -48,24 +39,15 @@ components:
- name: mattermost
required: true
description: "Deploy Mattermost"
import:
path: common
only:
flavor: registry1
cluster:
architecture: amd64
charts:
- name: uds-mattermost-config
namespace: mattermost
version: 0.1.0
localPath: chart
valuesFiles:
- values/config-values.yaml
- name: mattermost-enterprise-edition
namespace: mattermost
url: https://helm.mattermost.com
gitPath: chart
version: 2.6.43
valuesFiles:
- values/values.yaml
- values/registry1-values.yaml
images:
- registry1.dso.mil/ironbank/redhat/ubi/ubi9-minimal:9.3
Expand Down

0 comments on commit d52c96c

Please sign in to comment.