Skip to content

Commit

Permalink
chore: add pre release testing (#87)
Browse files Browse the repository at this point in the history
## Description

- Add pre release testing
- Add build and test on arm64 runner for arm64 arch, moving arch to the
github workflow matrix
- Update to latest uds-common
- Change registry1 sonarqube community image to more stable image ref
- Update to latest postgres operator for arm64 support

## Related Issue

Fixes #84 
Relates to
#defenseunicorns/uds-software-factory#30

## 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

- [ ] Test, docs, adr added or updated as needed
- [ ] [Contributor Guide
Steps](https://github.com/defenseunicorns/uds-package-sonarqube/blob/main/CONTRIBUTING.md#developer-workflow)
followed
  • Loading branch information
ericwyles committed Jun 12, 2024
1 parent 3f1db0e commit f024ebf
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 35 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@11e591f2ec7d158923d973c85097ce28a5f55db4 # v0.4.5
uses: defenseunicorns/uds-common/.github/workflows/commitlint.yaml@4cea6c8858b9f4db3a3624a6fc046db77e1f4eaa # v0.5.0
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fetch-depth: 0

- name: Environment setup
uses: defenseunicorns/uds-common/.github/actions/setup@11e591f2ec7d158923d973c85097ce28a5f55db4 # v0.4.5
uses: defenseunicorns/uds-common/.github/actions/setup@4cea6c8858b9f4db3a3624a6fc046db77e1f4eaa # v0.5.0
with:
registry1Username: ${{ secrets.IRON_BANK_ROBOT_USERNAME }}
registry1Password: ${{ secrets.IRON_BANK_ROBOT_PASSWORD }}
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/tag-and-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,15 @@ jobs:
publish-package:
needs: tag-new-version
if: ${{ needs.tag-new-version.outputs.release_created == 'true' }}
runs-on: ubuntu-latest
runs-on: ${{ matrix.architecture == 'arm64' && 'uds-ubuntu-arm64-4-core' || 'ubuntu-latest' }}
strategy:
matrix:
flavor: [upstream, registry1]
name: Publish ${{ matrix.flavor }}
architecture: [amd64, arm64]
exclude:
- flavor: registry1
architecture: arm64
name: Publish ${{ matrix.flavor }} ${{ matrix.architecture }}

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

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

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

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

- name: Environment setup
uses: defenseunicorns/uds-common/.github/actions/setup@11e591f2ec7d158923d973c85097ce28a5f55db4 # v0.4.5
uses: defenseunicorns/uds-common/.github/actions/setup@4cea6c8858b9f4db3a3624a6fc046db77e1f4eaa # v0.5.0
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@11e591f2ec7d158923d973c85097ce28a5f55db4 # v0.4.5
uses: defenseunicorns/uds-common/.github/actions/test@4cea6c8858b9f4db3a3624a6fc046db77e1f4eaa # v0.5.0
with:
flavor: ${{ matrix.flavor }}
type: ${{ matrix.type }}

- name: Save logs
if: always()
uses: defenseunicorns/uds-common/.github/actions/save-logs@11e591f2ec7d158923d973c85097ce28a5f55db4 # v0.4.5
uses: defenseunicorns/uds-common/.github/actions/save-logs@4cea6c8858b9f4db3a3624a6fc046db77e1f4eaa # v0.5.0
with:
suffix: ${{ matrix.type }}-${{ matrix.flavor }}-${{ github.run_id }}-${{ github.run_attempt }}

Expand Down
2 changes: 1 addition & 1 deletion bundle/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ packages:

- name: postgres-operator
repository: ghcr.io/defenseunicorns/packages/uds/postgres-operator
ref: 1.11.0-uds.0-upstream
ref: 1.11.0-uds.1-upstream
overrides:
postgres-operator:
uds-postgres-config:
Expand Down
18 changes: 7 additions & 11 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ includes:
- cleanup: ./tasks/cleanup.yaml
- dependencies: ./tasks/dependencies.yaml
- test: ./tasks/test.yaml
- create: https://github.com/raw/defenseunicorns/uds-common/v0.4.5/tasks/create.yaml
- lint: https://github.com/raw/defenseunicorns/uds-common/v0.4.5/tasks/lint.yaml
- pull: https://github.com/raw/defenseunicorns/uds-common/v0.4.5/tasks/pull.yaml
- deploy: https://github.com/raw/defenseunicorns/uds-common/v0.4.5/tasks/deploy.yaml
- setup: https://github.com/raw/defenseunicorns/uds-common/v0.4.5/tasks/setup.yaml
- create: https://github.com/raw/defenseunicorns/uds-common/v0.5.0/tasks/create.yaml
- lint: https://github.com/raw/defenseunicorns/uds-common/v0.5.0/tasks/lint.yaml
- pull: https://github.com/raw/defenseunicorns/uds-common/v0.5.0/tasks/pull.yaml
- deploy: https://github.com/raw/defenseunicorns/uds-common/v0.5.0/tasks/deploy.yaml
- setup: https://github.com/raw/defenseunicorns/uds-common/v0.5.0/tasks/setup.yaml

tasks:
- name: default
Expand Down Expand Up @@ -54,9 +54,7 @@ tasks:
- task: setup:k3d-test-cluster
- task: deploy:test-bundle
- task: setup:create-doug-user
- task: test:health-check
- task: test:ingress
- task: test:ui
- task: test:all

- name: test-upgrade
description: Test an upgrade from the latest released package to the current branch
Expand All @@ -67,6 +65,4 @@ tasks:
- task: setup:create-doug-user
- task: create-sq-test-bundle
- task: deploy:test-bundle
- task: test:health-check
- task: test:ingress
- task: test:ui
- task: test:all
24 changes: 13 additions & 11 deletions tasks/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
includes:
- create: https://github.com/raw/defenseunicorns/uds-common/v0.4.5/tasks/create.yaml
- publish: https://github.com/raw/defenseunicorns/uds-common/v0.4.5/tasks/publish.yaml
- create: https://github.com/raw/defenseunicorns/uds-common/v0.5.0/tasks/create.yaml
- publish: https://github.com/raw/defenseunicorns/uds-common/v0.5.0/tasks/publish.yaml
- setup: https://github.com/raw/defenseunicorns/uds-common/v0.5.0/tasks/setup.yaml
- deploy: https://github.com/raw/defenseunicorns/uds-common/v0.5.0/tasks/deploy.yaml
- dependencies: ./dependencies.yaml
- test: ./test.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: dependencies:create
- task: create:test-bundle
- task: setup:k3d-test-cluster
- task: deploy:test-bundle
- task: setup:create-doug-user
- task: test:all

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

- name: health-check
actions:
# StatefulSets don't show conditions themselves so we look for an underlying Pod
Expand Down
2 changes: 1 addition & 1 deletion values/registry1-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
image:
repository: registry1.dso.mil/ironbank/big-bang/sonarqube-9
repository: registry1.dso.mil/ironbank/sonarsource/sonarqube/sonarqube
tag: 9.9.5-community

initContainers:
Expand Down
2 changes: 1 addition & 1 deletion zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ components:
- values/registry1-values.yaml
images:
- "registry1.dso.mil/ironbank/big-bang/base:2.1.0"
- "registry1.dso.mil/ironbank/big-bang/sonarqube-9:9.9.5-community"
- "registry1.dso.mil/ironbank/sonarsource/sonarqube/sonarqube:9.9.5-community"

# Note: upstream flavor is experimental
- name: sonarqube
Expand Down

0 comments on commit f024ebf

Please sign in to comment.