From c08a062bb3f3ede6860c3d7f34136b3e82b78715 Mon Sep 17 00:00:00 2001 From: zamaz <71521611+zachariahmiller@users.noreply.github.com> Date: Tue, 23 Jan 2024 16:31:44 -0500 Subject: [PATCH] chore: refactor ci for releases to remove certain artifacts (#125) ## Description refactor ci for releases to remove core-istio package and remove registry1 flavor of test bundles ## Related Issue Fixes # Relates to # ## 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 --- .github/workflows/tag-and-release.yml | 3 ++- bundles/k3d-istio/uds-bundle.yaml | 2 +- bundles/k3d-standard/uds-bundle.yaml | 2 +- tasks/deploy.yaml | 4 ++-- tasks/publish.yaml | 22 ++++++---------------- 5 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.github/workflows/tag-and-release.yml b/.github/workflows/tag-and-release.yml index 99d7bd577..3b4a32ad0 100644 --- a/.github/workflows/tag-and-release.yml +++ b/.github/workflows/tag-and-release.yml @@ -48,7 +48,8 @@ jobs: run: uds run -f tasks/publish.yaml packages --set FLAVOR=${{ matrix.flavor }} - name: Publish UDS Bundles - run: uds run -f tasks/publish.yaml bundles --set FLAVOR=${{ matrix.flavor }} + if: ${{ matrix.flavor != 'registry1' }} + run: uds run -f tasks/publish.yaml bundles - name: Save logs if: always() diff --git a/bundles/k3d-istio/uds-bundle.yaml b/bundles/k3d-istio/uds-bundle.yaml index 311e02961..98649f1fa 100644 --- a/bundles/k3d-istio/uds-bundle.yaml +++ b/bundles/k3d-istio/uds-bundle.yaml @@ -1,6 +1,6 @@ kind: UDSBundle metadata: - name: k3d-core-istio + name: k3d-core-istio-dev description: A UDS bundle for deploying Istio from UDS Core on a development cluster # x-release-please-start-version version: "0.9.1" diff --git a/bundles/k3d-standard/uds-bundle.yaml b/bundles/k3d-standard/uds-bundle.yaml index 94be0d266..7f5d5dcf4 100644 --- a/bundles/k3d-standard/uds-bundle.yaml +++ b/bundles/k3d-standard/uds-bundle.yaml @@ -1,6 +1,6 @@ kind: UDSBundle metadata: - name: k3d-core + name: k3d-core-demo description: A UDS bundle for deploying the standard UDS Core package on a development cluster # x-release-please-start-version version: "0.9.1" diff --git a/tasks/deploy.yaml b/tasks/deploy.yaml index 091e71fe9..627b4b6db 100644 --- a/tasks/deploy.yaml +++ b/tasks/deploy.yaml @@ -11,12 +11,12 @@ tasks: - name: k3d-standard-bundle actions: - description: "Deploy the UDS Core Standard Bundle" - cmd: uds deploy bundles/k3d-standard/uds-bundle-k3d-core-${UDS_ARCH}-${VERSION}.tar.zst --confirm --no-progress + cmd: uds deploy bundles/k3d-standard/uds-bundle-k3d-core-demo-${UDS_ARCH}-${VERSION}.tar.zst --confirm --no-progress - name: k3d-istio-bundle actions: - description: "Deploy the UDS Core Istio Only Bundle" - cmd: uds deploy bundles/k3d-istio/uds-bundle-k3d-core-istio-${UDS_ARCH}-${VERSION}.tar.zst --confirm --no-progress + cmd: uds deploy bundles/k3d-istio/uds-bundle-k3d-core-istio-dev-${UDS_ARCH}-${VERSION}.tar.zst --confirm --no-progress - name: single-package actions: diff --git a/tasks/publish.yaml b/tasks/publish.yaml index 329df0988..69cd32944 100644 --- a/tasks/publish.yaml +++ b/tasks/publish.yaml @@ -31,11 +31,9 @@ tasks: cmd: | set -e zarf package publish build/zarf-package-core-amd64-${VERSION}.tar.zst ${TARGET_REPO} - zarf package publish build/zarf-package-core-istio-amd64-${VERSION}.tar.zst ${TARGET_REPO} # dont publish arm64 for registry1 since IB images are only amd64 if [ "${FLAVOR}" != "registry1" ]; then - zarf package publish build/zarf-package-core-istio-arm64-${VERSION}.tar.zst ${TARGET_REPO} zarf package publish build/zarf-package-core-arm64-${VERSION}.tar.zst ${TARGET_REPO} fi @@ -57,22 +55,14 @@ tasks: - description: "Publish the bundles" cmd: | set -e - uds publish bundles/k3d-standard/uds-bundle-k3d-core-amd64-${VERSION}.tar.zst ${TARGET_REPO}/bundles/${FLAVOR} --no-progress - uds publish bundles/k3d-istio/uds-bundle-k3d-core-istio-amd64-${VERSION}.tar.zst ${TARGET_REPO}/bundles/${FLAVOR} --no-progress - - # dont publish arm64 for registry1 since IB images are only amd64 - if [ "${FLAVOR}" != "registry1" ]; then - uds publish bundles/k3d-standard/uds-bundle-k3d-core-arm64-${VERSION}.tar.zst ${TARGET_REPO}/bundles/${FLAVOR} --no-progress - uds publish bundles/k3d-istio/uds-bundle-k3d-core-istio-arm64-${VERSION}.tar.zst ${TARGET_REPO}/bundles/${FLAVOR} --no-progress - fi + 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 - description: "Tag the latest bundles" cmd: | set -e - pkgPath="ghcr.io/defenseunicorns/packages/uds/bundles/${FLAVOR}/k3d-core" - # dont tag arm64 for registry1 since IB images are only amd64 - if [ "${FLAVOR}" != "registry1" ]; then - zarf tools registry copy ${pkgPath}:${VERSION}-arm64 ${pkgPath}:arm64 - fi - + pkgPath="ghcr.io/defenseunicorns/packages/uds/bundles/k3d-core-demo" + zarf tools registry copy ${pkgPath}:${VERSION}-arm64 ${pkgPath}:arm64 zarf tools registry copy ${pkgPath}:${VERSION}-amd64 ${pkgPath}:amd64