diff --git a/.github/workflows/publish-packages.yml b/.github/workflows/publish-packages.yml index 5d6fdd1..8bc43e3 100644 --- a/.github/workflows/publish-packages.yml +++ b/.github/workflows/publish-packages.yml @@ -21,7 +21,7 @@ jobs: - name: Login to GHCR run: | - uds run registry-login \ + ./uds run registry-login \ --set REGISTRY=ghcr.io \ --set REGISTRY_USERNAME=dummy \ --set REGISTRY_PASSWORD=${{ secrets.GITHUB_TOKEN }} \ @@ -29,17 +29,14 @@ jobs: - name: Login to registry1 run: | - uds run registry-login \ + ./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 Zarf Packages - run: uds run publish-packages - - - name: publish UDS Bundles - run: uds run publish-bundles + run: ./uds run publish-packages - name: Save logs if: always() diff --git a/.github/workflows/release-packages.yml b/.github/workflows/release-packages.yml new file mode 100644 index 0000000..974d596 --- /dev/null +++ b/.github/workflows/release-packages.yml @@ -0,0 +1,51 @@ +name: release-packages + +on: + # manual, idk + workflow_dispatch: + # Detect changes to files made since the last pushed commit. + push: + branches: + - refactor/change-release-patterns + # Detect changes to all files in a Pull request relative to the target branch or since the last pushed commit. + pull_request: + branches: + - main + +jobs: + changed-files: + name: Get changed files + runs-on: ubuntu-latest + outputs: + matrix: ${{ steps.get-changed-files.outputs.matrix }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v44 + with: + matrix: true + files_yaml: | + zarf: + - '**zarf*.yaml' + - name: List all changed files + run: echo '${{ steps.changed-files.outputs.all_changed_files }}' + + matrix-job: + name: Run Matrix Job + runs-on: ubuntu-latest + needs: [changed-files] + strategy: + matrix: + files: ${{ fromJSON(needs.changed-files.outputs.matrix) }} + max-parallel: 4 + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Test + run: | + echo ${{ matrix.files }} diff --git a/bundles/eks-addons/registry1/README.md b/bundles/eks-addons/registry1/README.md deleted file mode 100644 index 4716392..0000000 --- a/bundles/eks-addons/registry1/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Project Title - -## Description - -UDS bundle that deploys eks-addons using zarf packages created with containers from registry1. - -## Usage - -uds deploy "oci://ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/bundles/eks-addons:${UDS_EKS_ADDONS_VERSION}-registry1" --confirm diff --git a/bundles/eks-addons/registry1/uds-bundle.yaml b/bundles/eks-addons/registry1/uds-bundle.yaml deleted file mode 100644 index e507d6c..0000000 --- a/bundles/eks-addons/registry1/uds-bundle.yaml +++ /dev/null @@ -1,39 +0,0 @@ -kind: UDSBundle -metadata: - name: eks-addons - description: UDS bundle of eks-addons with registry1 images - # x-release-please-start-version - version: 0.0.1-registry1 - # x-release-please-end-version - source: https://github.com/defenseunicorns/narwhal-delivery-zarf-package-eks-addons - -packages: - - name: storageclass - repository: ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/storageclass - ref: 0.0.1 - optionalComponents: - - fetch-staged-aws-ssm-vars - - - name: aws-node-termination-handler - repository: ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/aws-node-termination-handler - ref: 0.0.1-registry1 - optionalComponents: - - fetch-staged-aws-ssm-vars - - - name: cluster-autoscaler - repository: ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/cluster-autoscaler - ref: 0.0.1-registry1 - optionalComponents: - - fetch-staged-aws-ssm-vars - - - name: aws-load-balancer-controller - repository: ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/aws-load-balancer-controller - ref: 0.0.1 - optionalComponents: - - fetch-staged-aws-ssm-vars - - - name: external-secrets - repository: ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/external-secrets - ref: 0.0.1-registry1 - optionalComponents: - - fetch-staged-aws-ssm-vars diff --git a/bundles/eks-addons/upstream/README.md b/bundles/eks-addons/upstream/README.md deleted file mode 100644 index f071b52..0000000 --- a/bundles/eks-addons/upstream/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Project Title - -## Description - -UDS bundle that deploys eks-addons using zarf packages created with containers from upstream registries. - -## Usage - -uds deploy "oci://ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/bundles/eks-addons:${UDS_EKS_ADDONS_VERSION}" --confirm diff --git a/bundles/eks-addons/upstream/uds-bundle.yaml b/bundles/eks-addons/upstream/uds-bundle.yaml deleted file mode 100644 index fec5358..0000000 --- a/bundles/eks-addons/upstream/uds-bundle.yaml +++ /dev/null @@ -1,39 +0,0 @@ -kind: UDSBundle -metadata: - name: eks-addons - description: UDS bundle of eks-addons - # x-release-please-start-version - version: 0.0.1 - # x-release-please-end-version - source: https://github.com/defenseunicorns/narwhal-delivery-zarf-package-eks-addons - -packages: - - name: storageclass - repository: ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/storageclass - ref: 0.0.1 - optionalComponents: - - fetch-staged-aws-ssm-vars - - - name: aws-node-termination-handler - repository: ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/aws-node-termination-handler - ref: 0.0.1 - optionalComponents: - - fetch-staged-aws-ssm-vars - - - name: cluster-autoscaler - repository: ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/cluster-autoscaler - ref: 0.0.1 - optionalComponents: - - fetch-staged-aws-ssm-vars - - - name: external-secrets - repository: ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/external-secrets - ref: 0.0.1 - optionalComponents: - - fetch-staged-aws-ssm-vars - - - name: aws-load-balancer-controller - repository: ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/aws-load-balancer-controller - ref: 0.0.1 - optionalComponents: - - fetch-staged-aws-ssm-vars diff --git a/packages/aws-load-balancer-controller/zarf-config.yaml b/packages/aws-load-balancer-controller/zarf-config.yaml index 85c857f..1441d04 100644 --- a/packages/aws-load-balancer-controller/zarf-config.yaml +++ b/packages/aws-load-balancer-controller/zarf-config.yaml @@ -2,7 +2,7 @@ package: create: output: ../../build set: - package_version: 0.0.1 + # package_version: 0.0.1 package_tag_suffix: "" package_name: aws-load-balancer-controller namespace: kube-system diff --git a/packages/aws-load-balancer-controller/zarf.yaml b/packages/aws-load-balancer-controller/zarf.yaml index 5ce9d80..3e220ff 100644 --- a/packages/aws-load-balancer-controller/zarf.yaml +++ b/packages/aws-load-balancer-controller/zarf.yaml @@ -2,16 +2,14 @@ kind: ZarfPackageConfig metadata: name: aws-load-balancer-controller description: Zarf package of aws-load-balancer-controller - version: "###ZARF_PKG_TMPL_PACKAGE_VERSION######ZARF_PKG_TMPL_PACKAGE_TAG_SUFFIX###" + version: "###ZARF_PKG_TMPL_IMAGE_VERSION######ZARF_PKG_TMPL_PACKAGE_TAG_SUFFIX###" source: https://github.com/defenseunicorns/narwhal-delivery-zarf-package-eks-addons -constants: +variables: - name: IMAGE_VERSION - value: "###ZARF_PKG_TMPL_IMAGE_VERSION###" + default: "###ZARF_PKG_TMPL_IMAGE_VERSION###" - name: IMAGE_REGISTRY_PATH - value: "###ZARF_PKG_TMPL_IMAGE_REGISTRY_PATH###" - -variables: + default: "###ZARF_PKG_TMPL_IMAGE_REGISTRY_PATH###" - name: CLUSTER_NAME type: raw prompt: false diff --git a/packages/aws-node-termination-handler/zarf.yaml b/packages/aws-node-termination-handler/zarf.yaml index 8155179..4881d40 100644 --- a/packages/aws-node-termination-handler/zarf.yaml +++ b/packages/aws-node-termination-handler/zarf.yaml @@ -2,16 +2,14 @@ kind: ZarfPackageConfig metadata: name: aws-node-termination-handler description: Zarf package of aws-node-termination-handler - version: "###ZARF_PKG_TMPL_PACKAGE_VERSION######ZARF_PKG_TMPL_PACKAGE_TAG_SUFFIX###" + version: "###ZARF_PKG_TMPL_IMAGE_VERSION######ZARF_PKG_TMPL_PACKAGE_TAG_SUFFIX###" source: https://github.com/defenseunicorns/narwhal-delivery-zarf-package-eks-addons -constants: +variables: - name: IMAGE_VERSION - value: "###ZARF_PKG_TMPL_IMAGE_VERSION###" + default: "###ZARF_PKG_TMPL_IMAGE_VERSION###" - name: IMAGE_REGISTRY_PATH - value: "###ZARF_PKG_TMPL_IMAGE_REGISTRY_PATH###" - -variables: + default: "###ZARF_PKG_TMPL_IMAGE_REGISTRY_PATH###" - name: CLUSTER_NAME type: raw prompt: false diff --git a/packages/cluster-autoscaler/zarf.yaml b/packages/cluster-autoscaler/zarf.yaml index 58f55c1..72a0079 100644 --- a/packages/cluster-autoscaler/zarf.yaml +++ b/packages/cluster-autoscaler/zarf.yaml @@ -2,16 +2,14 @@ kind: ZarfPackageConfig metadata: name: cluster-autoscaler description: Zarf package of cluster-autoscaler - version: "###ZARF_PKG_TMPL_PACKAGE_VERSION######ZARF_PKG_TMPL_PACKAGE_TAG_SUFFIX###" + version: "###ZARF_PKG_TMPL_IMAGE_VERSION######ZARF_PKG_TMPL_PACKAGE_TAG_SUFFIX###" source: https://github.com/defenseunicorns/narwhal-delivery-zarf-package-eks-addons -constants: +variables: - name: IMAGE_VERSION - value: "###ZARF_PKG_TMPL_IMAGE_VERSION###" + default: "###ZARF_PKG_TMPL_IMAGE_VERSION###" - name: IMAGE_REGISTRY_PATH - value: "###ZARF_PKG_TMPL_IMAGE_REGISTRY_PATH###" - -variables: + default: "###ZARF_PKG_TMPL_IMAGE_REGISTRY_PATH###" - name: CLUSTER_NAME type: raw prompt: false diff --git a/packages/external-secrets/zarf.yaml b/packages/external-secrets/zarf.yaml index 0b146ce..74f2a58 100644 --- a/packages/external-secrets/zarf.yaml +++ b/packages/external-secrets/zarf.yaml @@ -2,16 +2,14 @@ kind: ZarfPackageConfig metadata: name: external-secrets description: Zarf package of external-secrets - version: "###ZARF_PKG_TMPL_PACKAGE_VERSION######ZARF_PKG_TMPL_PACKAGE_TAG_SUFFIX###" + version: "###ZARF_PKG_TMPL_IMAGE_VERSION######ZARF_PKG_TMPL_PACKAGE_TAG_SUFFIX###" source: https://github.com/defenseunicorns/narwhal-delivery-zarf-package-eks-addons -constants: +variables: - name: IMAGE_VERSION - value: "###ZARF_PKG_TMPL_IMAGE_VERSION###" + default: "###ZARF_PKG_TMPL_IMAGE_VERSION###" - name: IMAGE_REGISTRY_PATH - value: "###ZARF_PKG_TMPL_IMAGE_REGISTRY_PATH###" - -variables: + default: "###ZARF_PKG_TMPL_IMAGE_REGISTRY_PATH###" - name: CLUSTER_NAME type: raw prompt: false diff --git a/packages/metrics-server/zarf.yaml b/packages/metrics-server/zarf.yaml index 7b4da8b..abd2a1e 100644 --- a/packages/metrics-server/zarf.yaml +++ b/packages/metrics-server/zarf.yaml @@ -2,16 +2,14 @@ kind: ZarfPackageConfig metadata: name: metrics-server description: Zarf package of metrics-server - version: "###ZARF_PKG_TMPL_PACKAGE_VERSION######ZARF_PKG_TMPL_PACKAGE_TAG_SUFFIX###" + version: "###ZARF_PKG_TMPL_IMAGE_VERSION######ZARF_PKG_TMPL_PACKAGE_TAG_SUFFIX###" source: https://github.com/defenseunicorns/narwhal-delivery-zarf-package-eks-addons -constants: +variables: - name: IMAGE_VERSION - value: "###ZARF_PKG_TMPL_IMAGE_VERSION###" + default: "###ZARF_PKG_TMPL_IMAGE_VERSION###" - name: IMAGE_REGISTRY_PATH - value: "###ZARF_PKG_TMPL_IMAGE_REGISTRY_PATH###" - -variables: + default: "###ZARF_PKG_TMPL_IMAGE_REGISTRY_PATH###" - name: VALUES_OVERRIDES type: file prompt: false diff --git a/packages/storageclass/zarf.yaml b/packages/storageclass/zarf.yaml index 11f6960..554e630 100644 --- a/packages/storageclass/zarf.yaml +++ b/packages/storageclass/zarf.yaml @@ -2,7 +2,7 @@ kind: ZarfPackageConfig metadata: name: storageclass description: Zarf package of EBS and EFS storage classes - version: "###ZARF_PKG_TMPL_PACKAGE_VERSION######ZARF_PKG_TMPL_PACKAGE_TAG_SUFFIX###" + version: "###ZARF_PKG_TMPL_IMAGE_VERSION######ZARF_PKG_TMPL_PACKAGE_TAG_SUFFIX###" source: https://github.com/defenseunicorns/narwhal-delivery-zarf-package-eks-addons variables: @@ -61,8 +61,8 @@ components: before: - cmd: | # check if gp2 storage class exists and annotation of storageclass.kubernetes.io/is-default-class":"true", if so patch it to be false - if uds zarf tools kubectl get storageclass gp2 -o jsonpath='{.metadata.annotations.storageclass\.kubernetes\.io/is-default-class}' | grep -q "true"; then - uds zarf tools kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}' + if ./uds zarf tools kubectl get storageclass gp2 -o jsonpath='{.metadata.annotations.storageclass\.kubernetes\.io/is-default-class}' | grep -q "true"; then + ./uds zarf tools kubectl patch storageclass gp2 -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}' fi manifests: - name: ebs-storageclass diff --git a/tasks.yaml b/tasks.yaml index 76b2aaa..1e60a55 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -45,7 +45,7 @@ tasks: ## zarf packages ### create packages - name: create-single-zarf-package - description: "Create single zarf with nested uds run command, specify the package name with the environment variable ${ZARF_PACKAGE_NAME}" + description: "Create single zarf with nested ./uds run command, specify the package name with the environment variable ${ZARF_PACKAGE_NAME}" actions: - task: set-preflight-env-vars - task: create:create-single-zarf-package @@ -56,25 +56,32 @@ tasks: - task: set-preflight-env-vars - task: create:create-all-zarf-packages - ## uds bundles - ### create bundles - - name: create-eks-addons-uds-bundles - description: "Create eks-addons uds bundles" - actions: - - task: create:create-eks-addons-uds-bundles - - ### deploy bundles - - name: deploy-single-package-from-bundle - description: Deploy single zarf package from UDS bundle. Use the environment variables ${UDS_BUNDLE} and ${ZARF_PACKAGE_NAME} to specify the bundle and package from the bundle to deploy. + - name: create-and-publish-single-zarf-package + description: "Create and publish single zarf package, specify the package name with the environment variable ${ZARF_PACKAGE_NAME}" actions: - task: set-preflight-env-vars - - task: deploy:deploy-single-package-from-bundle + - task: create:create-single-zarf-package + - task: publish:packages - - name: deploy-bundle - description: "Deploy the uds bundle" - actions: - - task: set-preflight-env-vars - - task: deploy:deploy-bundle + # ## uds bundles + # ### create bundles + # - name: create-eks-addons-uds-bundles + # description: "Create eks-addons uds bundles" + # actions: + # - task: create:create-eks-addons-uds-bundles + + # ### deploy bundles + # - name: deploy-single-package-from-bundle + # description: Deploy single zarf package from UDS bundle. Use the environment variables ${UDS_BUNDLE} and ${ZARF_PACKAGE_NAME} to specify the bundle and package from the bundle to deploy. + # actions: + # - task: set-preflight-env-vars + # - task: deploy:deploy-single-package-from-bundle + + # - name: deploy-bundle + # description: "Deploy the uds bundle" + # actions: + # - task: set-preflight-env-vars + # - task: deploy:deploy-bundle ## publish packages and bundles - name: publish-packages @@ -82,13 +89,13 @@ tasks: actions: - task: publish:packages - - name: publish-bundles - description: "Builds and publish UDS bundles" - actions: - - task: publish:bundles + # - name: publish-bundles + # description: "Builds and publish UDS bundles" + # actions: + # - task: publish:bundles - - name: test-bundle - description: "Test the uds bundle" - actions: - - task: setup-k3d-cluster - - task: deploy-bundle + # - name: test-bundle + # description: "Test the uds bundle" + # actions: + # - task: setup-k3d-cluster + # - task: deploy-bundle diff --git a/tasks/create.yaml b/tasks/create.yaml index bb107d0..876b316 100644 --- a/tasks/create.yaml +++ b/tasks/create.yaml @@ -5,9 +5,9 @@ variables: tasks: # Zarf packages - name: create-single-zarf-package - description: "Create single zarf package zarf-build-${ZARF_PACKAGE_NAME} using nested uds run command" + description: "Create single zarf package zarf-build-${ZARF_PACKAGE_NAME} using nested ./uds run command" actions: - - cmd: "uds run -f tasks/create.yaml zarf-build-${ZARF_PACKAGE_NAME} --no-progress" + - cmd: "./uds run -f tasks/create.yaml zarf-build-${ZARF_PACKAGE_NAME} --no-progress" - name: create-all-zarf-packages description: "Create all zarf packages" @@ -15,76 +15,78 @@ tasks: - task: zarf-build-aws-node-termination-handler - task: zarf-build-cluster-autoscaler - task: zarf-build-metrics-server + - task: zarf-build-aws-load-balancer-controller + - task: zarf-build-external-secrets - task: zarf-build-storageclass - name: zarf-build-aws-node-termination-handler description: "Create aws-node-termination-handler zarf package" actions: - description: run the make target for zarf-build-aws-node-termination-handler - cmd: "cd packages/aws-node-termination-handler && uds zarf package create --confirm" + cmd: "cd packages/aws-node-termination-handler && ./uds zarf package create --confirm" - name: zarf-build-cluster-autoscaler description: "Create cluster-autoscaler zarf package" actions: - description: run the make target for zarf-build-cluster-autoscaler - cmd: "cd packages/cluster-autoscaler && uds zarf package create --confirm" + cmd: "cd packages/cluster-autoscaler && ./uds zarf package create --confirm" - name: zarf-build-metrics-server description: "Create metrics-server zarf package" actions: - description: "Create metrics-server zarf package" - cmd: "cd packages/metrics-server && uds zarf package create --confirm" + cmd: "cd packages/metrics-server && ./uds zarf package create --confirm" - name: zarf-build-aws-load-balancer-controller description: "Create aws-load-balancer-controller zarf package" actions: - description: "Create aws-load-balancer-controller zarf package" - cmd: "cd packages/aws-load-balancer-controller && uds zarf package create --confirm" + cmd: "cd packages/aws-load-balancer-controller && ./uds zarf package create --confirm" - name: zarf-build-external-secrets description: "Create external-secrets zarf package" actions: - description: "Create external-secrets zarf package" - cmd: "cd packages/external-secrets && uds zarf package create --confirm" + cmd: "cd packages/external-secrets && ./uds zarf package create --confirm" - name: zarf-build-storageclass description: "Create storageclass zarf package" actions: - description: "Create storageclass zarf package" - cmd: "cd packages/storageclass && uds zarf package create --confirm" + cmd: "cd packages/storageclass && ./uds zarf package create --confirm" - # UDS bundles - - name: create-eks-addons-uds-bundles - description: "Parent task to create different bundle flavors" - actions: - - shell: - darwin: bash - linux: bash - cmd: | - # Define your directories and their corresponding architectures - declare -A directories - directories[bundles/eks-addons/registry1]="amd64" - directories[bundles/eks-addons/upstream]="amd64 arm64" + # # UDS bundles + # - name: create-eks-addons-uds-bundles + # description: "Parent task to create different bundle flavors" + # actions: + # - shell: + # darwin: bash + # linux: bash + # cmd: | + # # Define your directories and their corresponding architectures + # declare -A directories + # directories[bundles/eks-addons/registry1]="amd64" + # directories[bundles/eks-addons/upstream]="amd64 arm64" - # Loop through the directories - for dir in "${!directories[@]}"; do - # Get the architectures for this directory - archs=${directories[$dir]} - # Loop through each architecture - for arch in $archs; do - echo "Directory: $dir, Architecture: $arch" - uds create $dir --architecture $arch --confirm - done - done + # # Loop through the directories + # for dir in "${!directories[@]}"; do + # # Get the architectures for this directory + # archs=${directories[$dir]} + # # Loop through each architecture + # for arch in $archs; do + # echo "Directory: $dir, Architecture: $arch" + # uds create $dir --architecture $arch --confirm + # done + # done - - name: create-eks-addons-upstream-uds-bundle - description: "Create eks-addons uds bundle" - actions: - - description: "Create eks-addons upstream uds bundle" - cmd: "uds create bundles/eks-addons/upstream --confirm" + # - name: create-eks-addons-upstream-uds-bundle + # description: "Create eks-addons uds bundle" + # actions: + # - description: "Create eks-addons upstream uds bundle" + # cmd: "uds create bundles/eks-addons/upstream --confirm" - - name: create-eks-addons-registry1-uds-bundle - description: "Create eks-addons registry 1 uds bundle" - actions: - - description: "Create eks-addons registry 1 uds bundle" - cmd: "uds create bundles/eks-addons/registry1 --confirm" + # - name: create-eks-addons-registry1-uds-bundle + # description: "Create eks-addons registry 1 uds bundle" + # actions: + # - description: "Create eks-addons registry 1 uds bundle" + # cmd: "uds create bundles/eks-addons/registry1 --confirm" diff --git a/tasks/deploy.yaml b/tasks/deploy.yaml index 5ef4fd2..df7a9a1 100644 --- a/tasks/deploy.yaml +++ b/tasks/deploy.yaml @@ -1,31 +1,31 @@ -includes: - - setup: ./tasks/setup.yaml +# includes: +# - setup: ./tasks/setup.yaml -variables: - - name: VERSION - description: "The version of the package to deploy" - # x-release-please-start-version - default: "0.0.1" - # x-release-please-end-version - - name: UDS_FLAVOR - default: "" - description: "no special flavor of tags for the uds bundle" +# variables: +# - name: VERSION +# description: "The version of the package to deploy" +# # x-release-please-start-version +# default: "0.0.1" +# # x-release-please-end-version +# - name: UDS_FLAVOR +# default: "" +# description: "no special flavor of tags for the uds bundle" -tasks: - - name: dev-up - actions: - - task: setup:k3d-istio-bundle - - task: deploy-bundle +# tasks: +# - name: dev-up +# actions: +# - task: setup:k3d-istio-bundle +# - task: deploy-bundle - - name: deploy-bundle - actions: - - description: "Deploy the uds bundle" - cmd: | - uds deploy "oci://${UDS_EKS_ADDONS_REPO}:${UDS_EKS_ADDONS_VERSION}" --confirm +# - name: deploy-bundle +# actions: +# - description: "Deploy the uds bundle" +# cmd: | +# uds deploy "oci://${UDS_EKS_ADDONS_REPO}:${UDS_EKS_ADDONS_VERSION}" --confirm - - name: deploy-single-package-from-bundle - actions: - - description: "Deploy single package from uds bundle" - cmd: | - PACKAGE=${PACKAGE:-${UDS_PACKAGE_COMPONENT:-${ZARF_PACKAGE_NAME}}} # if PACKAGE is not set, use UDS_PACKAGE_COMPONENT, if that is not set, use ZARF_PACKAGE_NAME - uds deploy "oci://${UDS_EKS_ADDONS_REPO}:${UDS_EKS_ADDONS_VERSION}" --confirm --package ${PACKAGE} +# - name: deploy-single-package-from-bundle +# actions: +# - description: "Deploy single package from uds bundle" +# cmd: | +# PACKAGE=${PACKAGE:-${UDS_PACKAGE_COMPONENT:-${ZARF_PACKAGE_NAME}}} # if PACKAGE is not set, use UDS_PACKAGE_COMPONENT, if that is not set, use ZARF_PACKAGE_NAME +# uds deploy "oci://${UDS_EKS_ADDONS_REPO}:${UDS_EKS_ADDONS_VERSION}" --confirm --package ${PACKAGE} diff --git a/tasks/publish.yaml b/tasks/publish.yaml index 352d70b..3424ed3 100644 --- a/tasks/publish.yaml +++ b/tasks/publish.yaml @@ -1,11 +1,6 @@ variables: - name: TARGET_REPO default: oci://ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons - - name: VERSION - description: "The version of the packages to build" - # x-release-please-start-version - default: "0.0.1" - # x-release-please-end - name: PACKAGE_DIR description: "The directory to build the packages in" default: "build" @@ -18,84 +13,97 @@ tasks: cmd: | set -e export TARGET_REPO=${TARGET_REPO} - ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml zarf-build-aws-load-balancer-controller --no-progress - ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml zarf-build-aws-load-balancer-controller --no-progress + ZARF_ARCHITECTURE=amd64 ./uds run -f tasks/create.yaml zarf-build-aws-load-balancer-controller --no-progress + ZARF_ARCHITECTURE=arm64 ./uds run -f tasks/create.yaml zarf-build-aws-load-balancer-controller --no-progress - description: "Create zarf external-secrets packages" cmd: | set -e export TARGET_REPO=${TARGET_REPO} - ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml zarf-build-external-secrets --no-progress - ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml zarf-build-external-secrets --no-progress - ZARF_CONFIG=./zarf-config-registry1.yaml ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml zarf-build-external-secrets --no-progress + ZARF_ARCHITECTURE=amd64 ./uds run -f tasks/create.yaml zarf-build-external-secrets --no-progress + ZARF_ARCHITECTURE=arm64 ./uds run -f tasks/create.yaml zarf-build-external-secrets --no-progress + ZARF_CONFIG=./zarf-config-registry1.yaml ZARF_ARCHITECTURE=amd64 ./uds run -f tasks/create.yaml zarf-build-external-secrets --no-progress - description: "Create zarf aws-node-termination-handler packages" cmd: | set -e export TARGET_REPO=${TARGET_REPO} - ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml zarf-build-aws-node-termination-handler --no-progress - ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml zarf-build-aws-node-termination-handler --no-progress - ZARF_CONFIG=./zarf-config-registry1.yaml ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml zarf-build-aws-node-termination-handler --no-progress + ZARF_ARCHITECTURE=amd64 ./uds run -f tasks/create.yaml zarf-build-aws-node-termination-handler --no-progress + ZARF_ARCHITECTURE=arm64 ./uds run -f tasks/create.yaml zarf-build-aws-node-termination-handler --no-progress + ZARF_CONFIG=./zarf-config-registry1.yaml ZARF_ARCHITECTURE=amd64 ./uds run -f tasks/create.yaml zarf-build-aws-node-termination-handler --no-progress - description: "Create zarf cluster-autoscaler packages" cmd: | set -e export TARGET_REPO=${TARGET_REPO} - ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml zarf-build-cluster-autoscaler --no-progress - ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml zarf-build-cluster-autoscaler --no-progress - ZARF_CONFIG=./zarf-config-registry1.yaml ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml zarf-build-cluster-autoscaler --no-progress + ZARF_ARCHITECTURE=amd64 ./uds run -f tasks/create.yaml zarf-build-cluster-autoscaler --no-progress + ZARF_ARCHITECTURE=arm64 ./uds run -f tasks/create.yaml zarf-build-cluster-autoscaler --no-progress + ZARF_CONFIG=./zarf-config-registry1.yaml ZARF_ARCHITECTURE=amd64 ./uds run -f tasks/create.yaml zarf-build-cluster-autoscaler --no-progress - description: "Create zarf metrics-server packages" cmd: | set -e export TARGET_REPO=${TARGET_REPO} - ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml zarf-build-metrics-server --no-progress - ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml zarf-build-metrics-server --no-progress - ZARF_CONFIG=./zarf-config-registry1.yaml ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml zarf-build-metrics-server --no-progress + ZARF_ARCHITECTURE=amd64 ./uds run -f tasks/create.yaml zarf-build-metrics-server --no-progress + ZARF_ARCHITECTURE=arm64 ./uds run -f tasks/create.yaml zarf-build-metrics-server --no-progress + ZARF_CONFIG=./zarf-config-registry1.yaml ZARF_ARCHITECTURE=amd64 ./uds run -f tasks/create.yaml zarf-build-metrics-server --no-progress - description: "Create zarf storageclass packages" cmd: | set -e export TARGET_REPO=${TARGET_REPO} - ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml zarf-build-storageclass --no-progress - ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml zarf-build-storageclass --no-progress + ZARF_ARCHITECTURE=amd64 ./uds run -f tasks/create.yaml zarf-build-storageclass --no-progress + ZARF_ARCHITECTURE=arm64 ./uds run -f tasks/create.yaml zarf-build-storageclass --no-progress - description: "Publish the packages" cmd: | set -e - for package in ${PACKAGE_DIR}/zarf-package*${VERSION}*.tar.zst; do - uds zarf package publish ${package} ${TARGET_REPO} + for package in ${PACKAGE_DIR}/zarf-package*.tar.zst; do + ./uds zarf package publish ${package} ${TARGET_REPO} done if ${ZARF_PACKAGE_CLEANUP}; then - rm -f ${PACKAGE_DIR}/zarf-package*${VERSION}*.tar.zst + rm -f ${PACKAGE_DIR}/zarf-package*.tar.zst fi - - name: bundles - description: "Build and publish UDS bundles" + - name: publish + description: "Publish the zarf packages in the PACKAGE_DIR to the TARGET_REPO" actions: - - description: "Create the UDS Core Standard Bundle" + - description: publish the packages cmd: | set -e - uds run -f tasks/create.yaml create-eks-addons-uds-bundles --no-progress - - task: publish-bundles - - task: tag-latest-upstream-bundles - - - name: publish-bundles - description: "publish the bundles" - actions: - - cmd: | - set -e - for bundle in $(find ./bundles -name "uds-bundle*${VERSION}*.tar.zst"); do - uds publish ${bundle} ${TARGET_REPO}/bundles + for package in ${PACKAGE_DIR}/zarf-package*.tar.zst; do + ./uds zarf package publish ${package} ${TARGET_REPO} done + if ${ZARF_PACKAGE_CLEANUP}; then + rm -f ${PACKAGE_DIR}/zarf-package*.tar.zst + fi - - name: tag-latest-upstream-bundles - description: "Tag the latest upstream bundles" - actions: - - description: "Tag the latest upstream bundles" - cmd: | - set -e - pkgPath="ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/bundles/eks-addons" - for arch in amd64 arm64; do - uds zarf tools registry copy ${pkgPath}:${VERSION} ${pkgPath}:${arch} - done + # - name: bundles + # description: "Build and publish UDS bundles" + # actions: + # - description: "Create the UDS Core Standard Bundle" + # cmd: | + # set -e + # ./uds run -f tasks/create.yaml create-eks-addons-uds-bundles --no-progress + # - task: publish-bundles + # - task: tag-latest-upstream-bundles + + # - name: publish-bundles + # description: "publish the bundles" + # actions: + # - cmd: | + # set -e + # for bundle in $(find ./bundles -name "uds-bundle*${VERSION}*.tar.zst"); do + # uds publish ${bundle} ${TARGET_REPO}/bundles + # done + + # - name: tag-latest-upstream-bundles + # description: "Tag the latest upstream bundles" + # actions: + # - description: "Tag the latest upstream bundles" + # cmd: | + # set -e + # pkgPath="ghcr.io/defenseunicorns/packages/narwhal-delivery-zarf-package-eks-addons/bundles/eks-addons" + # for arch in amd64 arm64; do + # uds zarf tools registry copy ${pkgPath}:${VERSION} ${pkgPath}:${arch} + # done diff --git a/tasks/setup/main.yaml b/tasks/setup/main.yaml index 19c6d6f..67e4243 100644 --- a/tasks/setup/main.yaml +++ b/tasks/setup/main.yaml @@ -30,14 +30,14 @@ tasks: actions: - cmd: | echo ${{ .inputs.registryPassword }} | \ - uds zarf tools registry login \ + ./uds zarf tools registry login \ --username ${{ .inputs.registryUsername }} \ --password-stdin ${{ .inputs.registry }} \ >/dev/null description: "Authenticate to the registry" - cmd: | if [ ${{ .inputs.registry }} = "registry1.dso.mil" ]; then - uds zarf tools registry digest "${REGISTRY1_TEST_IMAGE}" >/dev/null || \ + ./uds zarf tools registry digest "${REGISTRY1_TEST_IMAGE}" >/dev/null || \ (sleep ${{ .inputs.registryRetryInterval }}; exit 1) fi description: "Validate registry connection"