Skip to content

Commit

Permalink
chore: add pre release testing and publish arm package (#12)
Browse files Browse the repository at this point in the history
## Description

Add pre release testing and publish arm package.

## Related Issue

Fixes #9 
Fixes #11 

## 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-valkey/blob/main/CONTRIBUTING.md#developer-workflow)
followed
  • Loading branch information
ericwyles committed Jun 21, 2024
1 parent 95b30eb commit 543a3a6
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/commitlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ on:
jobs:
validate:
name: Validate
uses: defenseunicorns/uds-common/.github/workflows/commitlint.yaml@4cea6c8858b9f4db3a3624a6fc046db77e1f4eaa # v0.5.0
uses: defenseunicorns/uds-common/.github/workflows/commitlint.yaml@0901c37366f37fea586768c79708e14e964e714e # v0.6.1
6 changes: 3 additions & 3 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:
fetch-depth: 0

- name: Environment setup
uses: defenseunicorns/uds-common/.github/actions/setup@4cea6c8858b9f4db3a3624a6fc046db77e1f4eaa # v0.5.0
uses: defenseunicorns/uds-common/.github/actions/setup@0901c37366f37fea586768c79708e14e964e714e # v0.6.1
with:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}

- name: Install lint deps
run: |
uds run lint:deps
uds run lint:deps --no-progress
- name: Lint the repository
run: |
uds run lint:yaml
uds run lint:yaml --no-progress
16 changes: 11 additions & 5 deletions .github/workflows/tag-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ jobs:
publish-package:
needs: tag-new-version
if: ${{ needs.tag-new-version.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
name: Publish ${{ matrix.flavor }}
runs-on: ${{ matrix.architecture == 'arm64' && 'uds-ubuntu-arm64-4-core' || 'ubuntu-latest' }}
name: Publish ${{ matrix.flavor }} ${{ matrix.architecture }}
strategy:
matrix:
flavor: [upstream]
architecture: [amd64, arm64]


permissions:
contents: read
Expand All @@ -40,7 +42,7 @@ jobs:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Environment setup
uses: defenseunicorns/uds-common/.github/actions/setup@4cea6c8858b9f4db3a3624a6fc046db77e1f4eaa # v0.5.0
uses: defenseunicorns/uds-common/.github/actions/setup@0901c37366f37fea586768c79708e14e964e714e # v0.6.1
with:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
Expand All @@ -49,8 +51,12 @@ jobs:
- name: Publish Package
run: uds run -f tasks/publish.yaml package --set FLAVOR=${{ matrix.flavor }}

- name: Debug Output
if: ${{ always() }}
uses: defenseunicorns/uds-common/.github/actions/debug-output@0901c37366f37fea586768c79708e14e964e714e # v0.6.1

- name: Save logs
if: always()
uses: defenseunicorns/uds-common/.github/actions/save-logs@4cea6c8858b9f4db3a3624a6fc046db77e1f4eaa # v0.5.0
uses: defenseunicorns/uds-common/.github/actions/save-logs@0901c37366f37fea586768c79708e14e964e714e # v0.6.1
with:
suffix: ${{ matrix.flavor }}-${{ github.run_id }}-${{ github.run_attempt }}
suffix: ${{ matrix.flavor }}-${{ matrix.architecture }}-${{ github.run_id }}-${{ github.run_attempt }}
8 changes: 4 additions & 4 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,24 @@ jobs:
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Environment setup
uses: defenseunicorns/uds-common/.github/actions/setup@4cea6c8858b9f4db3a3624a6fc046db77e1f4eaa # v0.5.0
uses: defenseunicorns/uds-common/.github/actions/setup@0901c37366f37fea586768c79708e14e964e714e # v0.6.1
with:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}

- name: Test
uses: defenseunicorns/uds-common/.github/actions/test@4cea6c8858b9f4db3a3624a6fc046db77e1f4eaa # v0.5.0
uses: defenseunicorns/uds-common/.github/actions/test@0901c37366f37fea586768c79708e14e964e714e # v0.6.1
with:
flavor: ${{ matrix.flavor }}
type: ${{ matrix.type }}

- name: Debug Output
if: ${{ always() }}
uses: defenseunicorns/uds-common/.github/actions/debug-output@4cea6c8858b9f4db3a3624a6fc046db77e1f4eaa # v0.5.0
uses: defenseunicorns/uds-common/.github/actions/debug-output@0901c37366f37fea586768c79708e14e964e714e # v0.6.1

- name: Save logs
if: always()
uses: defenseunicorns/uds-common/.github/actions/save-logs@4cea6c8858b9f4db3a3624a6fc046db77e1f4eaa # v0.5.0
uses: defenseunicorns/uds-common/.github/actions/save-logs@0901c37366f37fea586768c79708e14e964e714e # v0.6.1
with:
suffix: ${{ matrix.type }}-${{ matrix.flavor }}-${{ github.run_id }}-${{ github.run_attempt }}
16 changes: 7 additions & 9 deletions tasks.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
includes:
- test: ./tasks/test.yaml
- create: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.5.0/tasks/create.yaml
- lint: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.5.0/tasks/lint.yaml
- pull: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.5.0/tasks/pull.yaml
- deploy: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.5.0/tasks/deploy.yaml
- setup: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.5.0/tasks/setup.yaml
- create: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.6.1/tasks/create.yaml
- lint: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.6.1/tasks/lint.yaml
- pull: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.6.1/tasks/pull.yaml
- deploy: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.6.1/tasks/deploy.yaml
- setup: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.6.1/tasks/setup.yaml

tasks:
- name: default
Expand Down Expand Up @@ -50,8 +50,7 @@ tasks:
- task: create-vk-test-bundle
- task: setup:k3d-test-cluster
- task: deploy:test-bundle
- task: test:health-check
- task: test:setup-data-stores
- task: test:all

- name: test-upgrade
description: Test an upgrade from the latest released package to the current branch
Expand All @@ -61,5 +60,4 @@ tasks:
- task: deploy:test-bundle
- task: create-vk-test-bundle
- task: deploy:test-bundle
- task: test:health-check
- task: test:setup-data-stores
- task: test:all
21 changes: 10 additions & 11 deletions tasks/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
includes:
- create: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.5.0/tasks/create.yaml
- publish: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.5.0/tasks/publish.yaml
- test: ./test.yaml
- create: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.6.1/tasks/create.yaml
- deploy: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.6.1/tasks/deploy.yaml
- publish: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.6.1/tasks/publish.yaml
- setup: https://raw.githubusercontent.com/defenseunicorns/uds-common/v0.6.1/tasks/setup.yaml

tasks:
- name: package
description: Build and publish the packages
actions:
- description: Create the AMD64 package
task: create:package
with:
architecture: amd64

- description: Create the ARM64 package
task: create:package
with:
architecture: arm64
- task: create:package
- task: create:test-bundle
- task: setup:k3d-test-cluster
- task: deploy:test-bundle
- task: test:all

- description: Publish the packages
task: publish:package
Expand Down
5 changes: 5 additions & 0 deletions tasks/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
tasks:
- name: all
actions:
- task: health-check
- task: setup-data-stores

- name: setup-data-stores
actions:
- description: Create the data store test package for the Valkey instance
Expand Down

0 comments on commit 543a3a6

Please sign in to comment.