From f024ebfc32829e0f186ab5b49aa67efa5dc8b8da Mon Sep 17 00:00:00 2001 From: Eric Wyles <23637493+ericwyles@users.noreply.github.com> Date: Tue, 11 Jun 2024 22:01:07 -0500 Subject: [PATCH] chore: add pre release testing (#87) ## 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 #https://github.com/defenseunicorns/uds-software-factory/issues/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 --- .github/workflows/commitlint.yaml | 2 +- .github/workflows/lint.yaml | 2 +- .github/workflows/tag-and-release.yaml | 14 +++++++++----- .github/workflows/test.yaml | 6 +++--- bundle/uds-bundle.yaml | 2 +- tasks.yaml | 18 +++++++----------- tasks/publish.yaml | 24 +++++++++++++----------- tasks/test.yaml | 6 ++++++ values/registry1-values.yaml | 2 +- zarf.yaml | 2 +- 10 files changed, 43 insertions(+), 35 deletions(-) diff --git a/.github/workflows/commitlint.yaml b/.github/workflows/commitlint.yaml index 22984ae..bf16150 100644 --- a/.github/workflows/commitlint.yaml +++ b/.github/workflows/commitlint.yaml @@ -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 diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index f3be6a6..df012fa 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -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 }} diff --git a/.github/workflows/tag-and-release.yaml b/.github/workflows/tag-and-release.yaml index 1db64be..d74e1f9 100644 --- a/.github/workflows/tag-and-release.yaml +++ b/.github/workflows/tag-and-release.yaml @@ -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 @@ -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 }} diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 506bc80..4acb564 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -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 }} diff --git a/bundle/uds-bundle.yaml b/bundle/uds-bundle.yaml index eebbb7f..e8a797d 100644 --- a/bundle/uds-bundle.yaml +++ b/bundle/uds-bundle.yaml @@ -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: diff --git a/tasks.yaml b/tasks.yaml index 2b58bd4..4353ca4 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -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 @@ -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 @@ -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 diff --git a/tasks/publish.yaml b/tasks/publish.yaml index ef16007..4d75a47 100644 --- a/tasks/publish.yaml +++ b/tasks/publish.yaml @@ -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 diff --git a/tasks/test.yaml b/tasks/test.yaml index 55fe322..c4e070b 100644 --- a/tasks/test.yaml +++ b/tasks/test.yaml @@ -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 diff --git a/values/registry1-values.yaml b/values/registry1-values.yaml index 275c0fb..47fa9d5 100644 --- a/values/registry1-values.yaml +++ b/values/registry1-values.yaml @@ -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: diff --git a/zarf.yaml b/zarf.yaml index a0e955c..166065c 100644 --- a/zarf.yaml +++ b/zarf.yaml @@ -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