Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
zack-is-cool committed May 3, 2024
1 parent 7155d47 commit 73d5276
Show file tree
Hide file tree
Showing 18 changed files with 238 additions and 279 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/publish-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,22 @@ 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 }} \
--set REGISTRY_RETRY_INTERVAL=90
- 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()
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/release-packages.yml
Original file line number Diff line number Diff line change
@@ -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 }}
9 changes: 0 additions & 9 deletions bundles/eks-addons/registry1/README.md

This file was deleted.

39 changes: 0 additions & 39 deletions bundles/eks-addons/registry1/uds-bundle.yaml

This file was deleted.

9 changes: 0 additions & 9 deletions bundles/eks-addons/upstream/README.md

This file was deleted.

39 changes: 0 additions & 39 deletions bundles/eks-addons/upstream/uds-bundle.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion packages/aws-load-balancer-controller/zarf-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions packages/aws-load-balancer-controller/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions packages/aws-node-termination-handler/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions packages/cluster-autoscaler/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions packages/external-secrets/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 4 additions & 6 deletions packages/metrics-server/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions packages/storageclass/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
59 changes: 33 additions & 26 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -56,39 +56,46 @@ 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
description: "Builds and publish the zarf packages"
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
Loading

0 comments on commit 73d5276

Please sign in to comment.