Skip to content

Commit

Permalink
chore: test artifacts before publish (#198)
Browse files Browse the repository at this point in the history
## Description
Test artifacts before publishing them to make sure nothing has changed
with upstream or ironbank images.

## Related Issue
Resolves #150 

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] 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-template-capability/blob/main/CONTRIBUTING.md)(https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md#submitting-a-pull-request)
followed

---------

Co-authored-by: Micah Nagel <micah.nagel@defenseunicorns.com>
  • Loading branch information
TristanHoladay and mjnagel authored Mar 12, 2024
1 parent a0c6b32 commit 9732f32
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 38 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/tag-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
flavor: [upstream, registry1]
needs: tag-new-version
if: ${{ needs.tag-new-version.outputs.release_created == 'true'}}
runs-on: ubuntu-latest
runs-on: "uds-ubuntu-big-boy-8-core"
name: Publish packages

permissions:
Expand All @@ -46,11 +46,31 @@ jobs:
- name: Login to registry1
run: uds run registry-login --set REGISTRY=registry1.dso.mil --set REGISTRY_USERNAME=${{ secrets.IRON_BANK_ROBOT_USERNAME }} --set REGISTRY_PASSWORD=${{ secrets.IRON_BANK_ROBOT_PASSWORD }} --set REGISTRY_RETRY_INTERVAL=90

- name: Publish UDS Zarf Package
run: uds run -f tasks/publish.yaml packages --set FLAVOR=${{ matrix.flavor }}
- name: Create Packages and Bundles
run: |
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml standard-package --no-progress --set FLAVOR=${{ matrix.flavor }}
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml k3d-standard-bundle --no-progress
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml standard-package --no-progress --set FLAVOR=${{ matrix.flavor }}
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml k3d-standard-bundle --no-progress
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml istio-package --no-progress --set FLAVOR=${{ matrix.flavor }}
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml k3d-istio-bundle --no-progress
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml istio-package --no-progress --set FLAVOR=${{ matrix.flavor }}
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml k3d-istio-bundle --no-progress
# Standard Package by default tests what's in the Istio Package
- name: Test amd64 Bundle
run: |
uds run -f tasks/deploy.yaml k3d-standard-bundle --no-progress
uds run -f tasks/test.yaml validate-packages --no-progress
- name: Publish Standard Package
run: uds run -f tasks/publish.yaml standard-package --set FLAVOR=${{ matrix.flavor }}

- name: Publish UDS Bundles
if: ${{ matrix.flavor != 'registry1' }}
- name: Publish Upstream Flavored Bundles
if: ${{ matrix.flavor != 'registry1'}}
run: uds run -f tasks/publish.yaml bundles

- name: Save logs
Expand Down
42 changes: 9 additions & 33 deletions tasks/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,10 @@ variables:
# x-release-please-end

tasks:
- name: packages
description: "Build and publish the UDS packages"
- name: standard-package
description: "Publish the UDS package"
actions:
- description: "Create the UDS Core Standard Zarf Package"
cmd: |
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml standard-package --no-progress --set FLAVOR=${FLAVOR}
if [ "${FLAVOR}" != "registry1" ]; then
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml standard-package --no-progress --set FLAVOR=${FLAVOR}
fi
- description: "Create the UDS Core Istio Only Zarf Package"
cmd: |
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml istio-package --no-progress --set FLAVOR=${FLAVOR}
if [ "${FLAVOR}" != "registry1" ]; then
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml istio-package --no-progress --set FLAVOR=${FLAVOR}
fi
- description: "Publish the packages"
cmd: |
- cmd: |
uds zarf package publish build/zarf-package-core-amd64-${VERSION}.tar.zst ${TARGET_REPO}
# dont publish arm64 for registry1 since IB images are only amd64
Expand All @@ -39,24 +24,15 @@ tasks:
fi
- name: bundles
description: "Build and publish UDS bundles"
description: "Publish UDS Bundles"
actions:
- description: "Create the UDS Core Standard Bundle"
- description: "Publish amd64 and arm64 bundles"
cmd: |
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml k3d-standard-bundle --no-progress
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml k3d-standard-bundle --no-progress
uds publish bundles/k3d-standard/uds-bundle-k3d-*-amd64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress
uds publish bundles/k3d-standard/uds-bundle-k3d-*-arm64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress
- description: Create the UDS Core Istio Only Bundle
cmd: |
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml k3d-istio-bundle --no-progress
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml k3d-istio-bundle --no-progress
- description: "Publish the bundles"
cmd: |
uds publish bundles/k3d-standard/uds-bundle-k3d-core-demo-arm64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress
uds publish bundles/k3d-istio/uds-bundle-k3d-core-istio-dev-arm64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress
uds publish bundles/k3d-standard/uds-bundle-k3d-core-demo-amd64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress
uds publish bundles/k3d-istio/uds-bundle-k3d-core-istio-dev-amd64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress
uds publish bundles/k3d-istio/uds-bundle-k3d-*-arm64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress
uds publish bundles/k3d-istio/uds-bundle-k3d-*-amd64-${VERSION}.tar.zst ${TARGET_REPO}/bundles --no-progress
- description: "Tag the latest bundles"
cmd: |
Expand Down

0 comments on commit 9732f32

Please sign in to comment.