From 17b91255dc9e099ae1d754947226e19e820cade5 Mon Sep 17 00:00:00 2001 From: Zachariah Miller Date: Tue, 23 Jan 2024 13:49:26 -0500 Subject: [PATCH 1/3] chore: refactor ci for releases to remove core-istio package and remove registry1 flavor of test bundles --- .github/workflows/tag-and-release.yml | 3 ++- bundles/k3d-istio/uds-bundle.yaml | 2 +- bundles/k3d-standard/uds-bundle.yaml | 2 +- tasks/publish.yaml | 18 +++++++++--------- 4 files changed, 13 insertions(+), 12 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/publish.yaml b/tasks/publish.yaml index 329df0988..5eae14bbb 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,24 @@ 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 + + # dont publish dev & demo bundles for registry1 flavor 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 + 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 fi - description: "Tag the latest bundles" cmd: | set -e - pkgPath="ghcr.io/defenseunicorns/packages/uds/bundles/${FLAVOR}/k3d-core" + pkgPath="ghcr.io/defenseunicorns/packages/uds/bundles/k3d-core-demo" # dont tag arm64 for registry1 since IB images are only amd64 if [ "${FLAVOR}" != "registry1" ]; then zarf tools registry copy ${pkgPath}:${VERSION}-arm64 ${pkgPath}:arm64 + zarf tools registry copy ${pkgPath}:${VERSION}-amd64 ${pkgPath}:amd64 fi - zarf tools registry copy ${pkgPath}:${VERSION}-amd64 ${pkgPath}:amd64 + From 20131d52bef82ed61eea9074990d2451e0eee487 Mon Sep 17 00:00:00 2001 From: Zachariah Miller Date: Tue, 23 Jan 2024 15:08:12 -0500 Subject: [PATCH 2/3] chore: remove extra conditionals after omitting registry1 flavor from bundle publish matrix. fix lint error --- tasks/publish.yaml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/tasks/publish.yaml b/tasks/publish.yaml index 5eae14bbb..69cd32944 100644 --- a/tasks/publish.yaml +++ b/tasks/publish.yaml @@ -55,24 +55,14 @@ tasks: - description: "Publish the bundles" cmd: | set -e - - - # dont publish dev & demo bundles for registry1 flavor - if [ "${FLAVOR}" != "registry1" ]; then - 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 - 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/k3d-core-demo" - # dont tag arm64 for registry1 since IB images are only amd64 - if [ "${FLAVOR}" != "registry1" ]; then - zarf tools registry copy ${pkgPath}:${VERSION}-arm64 ${pkgPath}:arm64 - zarf tools registry copy ${pkgPath}:${VERSION}-amd64 ${pkgPath}:amd64 - fi - - + zarf tools registry copy ${pkgPath}:${VERSION}-arm64 ${pkgPath}:arm64 + zarf tools registry copy ${pkgPath}:${VERSION}-amd64 ${pkgPath}:amd64 From 810b1b62d1623791ad245bb7b2539a14686a9316 Mon Sep 17 00:00:00 2001 From: Zachariah Miller Date: Tue, 23 Jan 2024 15:51:43 -0500 Subject: [PATCH 3/3] chore: update deploy task with new bundle names --- tasks/deploy.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: