From 8d07d12c87ffe4853720a732e412e8f7d541900c Mon Sep 17 00:00:00 2001 From: codyshoffner Date: Thu, 26 Feb 2026 16:32:31 -0600 Subject: [PATCH 1/7] chore: remove excess in template --- .github/workflows/auto-update.yaml | 1 + bundle/uds-bundle.yaml | 5 --- bundle/uds-config.yaml | 7 ---- chart/templates/template-sso-secret.yaml | 18 ---------- chart/templates/uds-package.yaml | 29 ---------------- chart/values.yaml | 28 ++-------------- common/zarf.yaml | 5 --- tasks/test.yaml | 33 ------------------- .../example-custom-resource.yaml | 9 ----- .../example-secret.yaml | 11 ------- tests/optional-example-zarf-tests/zarf.yaml | 32 ------------------ values/common-values.yaml | 13 -------- values/registry1-values.yaml | 5 --- values/unicorn-values.yaml | 5 --- values/upstream-values.yaml | 5 --- zarf.yaml | 6 ---- 16 files changed, 4 insertions(+), 208 deletions(-) delete mode 100644 chart/templates/template-sso-secret.yaml delete mode 100644 tests/optional-example-zarf-tests/example-custom-resource.yaml delete mode 100644 tests/optional-example-zarf-tests/example-secret.yaml delete mode 100644 tests/optional-example-zarf-tests/zarf.yaml diff --git a/.github/workflows/auto-update.yaml b/.github/workflows/auto-update.yaml index 4038f8f..a681bbe 100644 --- a/.github/workflows/auto-update.yaml +++ b/.github/workflows/auto-update.yaml @@ -11,6 +11,7 @@ on: permissions: contents: write # Allows writing content to the repository. packages: read # Allows reading the content of the repository's packages. + pull-requests: write # Allows creating or updating pull requests. # Abort prior jobs in the same workflow / PR concurrency: diff --git a/bundle/uds-bundle.yaml b/bundle/uds-bundle.yaml index ec1a3a0..5aaf243 100644 --- a/bundle/uds-bundle.yaml +++ b/bundle/uds-bundle.yaml @@ -8,11 +8,6 @@ metadata: version: dev packages: - # #TEMPLATE_APPLICATION_NAME# has a dependency on some-application - # - name: some-application - # repository: ghcr.io/defenseunicorns/packages/uds/some-application - # ref: 0.1.3-upstream - - name: #TEMPLATE_APPLICATION_NAME# path: ../ ref: dev diff --git a/bundle/uds-config.yaml b/bundle/uds-config.yaml index e4cf9cf..2067cc5 100644 --- a/bundle/uds-config.yaml +++ b/bundle/uds-config.yaml @@ -1,9 +1,2 @@ # Copyright 2024 Defense Unicorns # SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial - -# variables: -# some-application: -# EXAMPLE_DEP_PACKAGE_VAR: true -# #TEMPLATE_APPLICATION_NAME#: -# EXAMPLE_DB_USERNAME: my-postgres-user -# EXAMPLE_DB_ENDPOINT: postgres diff --git a/chart/templates/template-sso-secret.yaml b/chart/templates/template-sso-secret.yaml deleted file mode 100644 index bbe493a..0000000 --- a/chart/templates/template-sso-secret.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2024 Defense Unicorns -# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial - -# This secret will be used if sso is disabled, instead of the templated one in uds-package.yaml. -# #TEMPLATE_APPLICATION_DISPLAY_NAME# needs to mount the secret and creating it this way avoids creating an unnecessary -# client in the keycloak realm and unnecessary secret data in the cluster. -{{- if not .Values.sso.enabled }} - -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Values.sso.secretName }} - namespace: {{ .Release.Namespace }} -type: "Opaque" -stringData: - #TEMPLATE_APPLICATION_NAME#.sso.config.key: | - example.saml.enabled: {{ .Values.sso.enabled }} -{{- end }} diff --git a/chart/templates/uds-package.yaml b/chart/templates/uds-package.yaml index d5aebf4..08a5356 100644 --- a/chart/templates/uds-package.yaml +++ b/chart/templates/uds-package.yaml @@ -7,35 +7,6 @@ metadata: name: #TEMPLATE_APPLICATION_NAME# namespace: {{ .Release.Namespace }} spec: - {{- if .Values.sso.enabled }} - sso: - - name: #TEMPLATE_APPLICATION_DISPLAY_NAME# Login - clientId: uds-package-#TEMPLATE_APPLICATION_NAME# - redirectUris: - - "https://#TEMPLATE_APPLICATION_NAME#.{{ .Values.domain }}/oauth2/callback/saml" - protocol: saml - defaultClientScopes: - - "mapper-saml-email-email" - - "mapper-saml-username-login" - - "mapper-saml-username-name" - - attributes: - saml.client.signature: "false" - - secretName: {{ .Values.sso.secretName }} - # This secret template configures sso for the application. Will need updated based on application required configuration - secretTemplate: - #TEMPLATE_APPLICATION_NAME#.sso.config.key: | - example.auth.saml.enabled: {{ .Values.sso.enabled }} - example.auth.saml.applicationId: clientField(clientId) - example.auth.saml.providerName: {{ .Values.sso.saml.providerName }} - example.auth.saml.providerId: https://sso.{{ .Values.domain }}/realms/uds - example.auth.saml.loginUrl: https://sso.{{ .Values.domain }}/realms/uds/protocol/saml - example.auth.saml.user.login: login - example.auth.saml.user.name: name - example.auth.saml.user.email: email - example.auth.saml.certificate.secured: clientField(samlIdpCertificate) - {{- end }} # Customize network policies and expose services via istio network: serviceMesh: diff --git a/chart/values.yaml b/chart/values.yaml index 3bea752..f861e61 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1,29 +1,7 @@ # Copyright 2024 Defense Unicorns # SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial -# Example values from UDS package repo template -domain: "###ZARF_VAR_DOMAIN###" -sso: - enabled: false - protocol: saml - secretName: #TEMPLATE_APPLICATION_NAME#-sso - adminGroups: ["/#TEMPLATE_APPLICATION_DISPLAY_NAME# Admin", "/UDS Core/Admin"] - saml: - providerName: "#TEMPLATE_APPLICATION_DISPLAY_NAME#" -# Support for custom `network.allow` entries on the Package CR + +# Support for custom `network.allow` entries on the Package CR +# https://uds.defenseunicorns.com/reference/configuration/uds-networking-configuration/#additional-network-allowances additionalNetworkAllow: [] -# # Notice no `remoteGenerated` field here on custom internal rule -# - direction: Ingress -# selector: -# app: jenkins -# remoteNamespace: jenkins -# remoteSelector: -# app: jenkins -# port: 8180 -# description: "Ingress from Jenkins" -# # No `remoteNamespace`, `remoteSelector`, or `port` fields on rule to `remoteGenerated` -# - direction: Egress -# selector: -# app: webservice -# remoteGenerated: Anywhere -# description: "Egress from #TEMPLATE_APPLICATION_NAME#" diff --git a/common/zarf.yaml b/common/zarf.yaml index 83443a7..747dae1 100644 --- a/common/zarf.yaml +++ b/common/zarf.yaml @@ -22,8 +22,3 @@ components: version: 1.2.3 valuesFiles: - ../values/common-values.yaml - -# You only need onDeploy.after.wait.cluster actions for non-UDS resources — items Zarf can’t automatically interpret, such as: -# Custom CRDs from third-party operators that don’t use kstatus -# External systems like databases, services, or Helm hooks -# Reference example implementation: https://docs.zarf.dev/ref/actions/#wait-action-configuration diff --git a/tasks/test.yaml b/tasks/test.yaml index a997d32..ab50ad8 100644 --- a/tasks/test.yaml +++ b/tasks/test.yaml @@ -5,7 +5,6 @@ tasks: - name: all actions: - task: health-check - # - task: custom-resource-test - task: ingress - task: ui @@ -20,38 +19,6 @@ tasks: namespace: #TEMPLATE_APPLICATION_NAME# condition: Available - # # If application manages custom resources, then test creating custom resources - # - name: custom-resource-test - # description: Test creating a custom resource - # actions: - # # Create test zarf package - # - cmd: | - # ./uds zarf package create --confirm - # dir: tests/optional-example-zarf-tests - # # Generate some kind of test data. In this example it is a certificate - # - cmd: | - # openssl req -x509 -newkey rsa:4096 -keyout testCA.key \ - # -out testCA.pem -sha256 -days 3650 -nodes -subj "/C=XX/ST=StateName/L=CityName/O=CompanyName/OU=CompanySectionName/CN=CommonNameOrHostname" - # dir: tests/optional-example-zarf-tests - # # Deploy package with test data - # - cmd: | - # ./uds zarf package deploy \ - # --set EXAMPLE_SECRET_VALUE="$(cat testCA.pem | base64 -w 0)" \ - # zarf-package-example-zarf-tests-"${UDS_ARCH}"-0.0.1.tar.zst \ - # --confirm - # dir: tests/optional-example-zarf-tests - # # Ensure expected resource is generated in some namespace. In this example it is checking for a configmap - # - description: Ensure configmap is created in target namespace - # wait: - # cluster: - # kind: configmap - # name: example-configmap - # namespace: example-ns - # # Cleanup files used to generate test data - # - cmd: | - # rm testCA.key testCA.pem - # dir: tests/optional-example-zarf-tests - - name: ingress actions: - description: #TEMPLATE_APPLICATION_DISPLAY_NAME# UI Status Check diff --git a/tests/optional-example-zarf-tests/example-custom-resource.yaml b/tests/optional-example-zarf-tests/example-custom-resource.yaml deleted file mode 100644 index 6ca6f92..0000000 --- a/tests/optional-example-zarf-tests/example-custom-resource.yaml +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright 2024 Defense Unicorns -# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial - -apiVersion: example-custom-resource.io/v1alpha1 -kind: example-custom-resource -metadata: - name: example-custom-resource -spec: -# custom resource spec diff --git a/tests/optional-example-zarf-tests/example-secret.yaml b/tests/optional-example-zarf-tests/example-secret.yaml deleted file mode 100644 index fe1ec22..0000000 --- a/tests/optional-example-zarf-tests/example-secret.yaml +++ /dev/null @@ -1,11 +0,0 @@ -# Copyright 2024 Defense Unicorns -# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial - -apiVersion: v1 -kind: Secret -metadata: - name: example-secret - namespace: test-ns -type: kubernetes.io/opaque -data: - chain.crt: "###ZARF_VAR_EXAMPLE_SECRET_VALUE###" diff --git a/tests/optional-example-zarf-tests/zarf.yaml b/tests/optional-example-zarf-tests/zarf.yaml deleted file mode 100644 index 574e94f..0000000 --- a/tests/optional-example-zarf-tests/zarf.yaml +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2024 Defense Unicorns -# SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial - -# yaml-language-server: $schema=https://raw.githubusercontent.com/defenseunicorns/zarf/main/zarf.schema.json -kind: ZarfPackageConfig -metadata: - name: example-zarf-tests - description: "Example zarf package for testing functionality of operators and other services deployed by UDS package" - architecture: "amd64" - version: "0.0.1" - -variables: - - name: EXAMPLE_SECRET_VALUE - description: "Some data needed for testing functionality" - -components: - # Create secret containing example secret value - - name: example-secret - required: true - manifests: - - name: example-secret - namespace: test-ns - files: - - example-secret.yaml - # Create some custom resource used by operator or service - - name: example-custom-resource - required: true - manifests: - - name: example-custom-resource - namespace: test-ns - files: - - example-custom-resource.yaml diff --git a/values/common-values.yaml b/values/common-values.yaml index fd2d601..b251327 100644 --- a/values/common-values.yaml +++ b/values/common-values.yaml @@ -3,16 +3,3 @@ # Values common to all flavors -# Example variables from UDS package repo template. Update to relevant variables after templating -# imagePullSecrets: -# - name: "private-registry" - -# postgresql: -# enabled: false -# postgresqlServer: ###ZARF_VAR_EXAMPLE_DB_ENDPOINT### -# existingSecret: "example-postgres" -# existingSecretPasswordKey: "password" -# postgresqlUsername: ###ZARF_VAR_EXAMPLE_DB_USERNAME### -# postgresqlDatabase: ###ZARF_VAR_EXAMPLE_DB_NAME### -# service: -# port: 5432 diff --git a/values/registry1-values.yaml b/values/registry1-values.yaml index 52d8fe4..9316333 100644 --- a/values/registry1-values.yaml +++ b/values/registry1-values.yaml @@ -2,8 +2,3 @@ # SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial # Values for registry1 flavor - -# Example variables from UDS package repo template. Update to relevant variables after templating -# image: -# repository: registry1.dso.mil/image -# tag: 1.2.3 diff --git a/values/unicorn-values.yaml b/values/unicorn-values.yaml index 59cb46f..7079894 100644 --- a/values/unicorn-values.yaml +++ b/values/unicorn-values.yaml @@ -2,8 +2,3 @@ # SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial # Values for unicorn flavor - -# Example variables from UDS package repo template. Update to relevant variables after templating -# image: -# repository: quay.io/rfcurated -# tag: 1.2.3 diff --git a/values/upstream-values.yaml b/values/upstream-values.yaml index 03a1e91..b690619 100644 --- a/values/upstream-values.yaml +++ b/values/upstream-values.yaml @@ -2,8 +2,3 @@ # SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial # Values for upstream flavor - -# Example variables from UDS package repo template. Update to relevant variables after templating -# image: -# repository: upstream/image -# tag: 1.2.3 diff --git a/zarf.yaml b/zarf.yaml index b20fa0a..b13f5db 100644 --- a/zarf.yaml +++ b/zarf.yaml @@ -15,14 +15,8 @@ metadata: dev.uds.icon: "" variables: - - name: EXAMPLE_VARIABLES - default: "examples" - name: DOMAIN default: "uds.dev" - - name: EXAMPLE_DB_USERNAME - default: "example_username" - - name: EXAMPLE_DB_ENDPOINT - default: "example_db_endpoint" components: - name: #TEMPLATE_APPLICATION_NAME# From 120f762c3c27dda7c6fd59f77c345425a2579e9c Mon Sep 17 00:00:00 2001 From: codyshoffner Date: Tue, 31 Mar 2026 16:24:08 -0500 Subject: [PATCH 2/7] feat: testing ci functionality --- tasks.yaml | 44 +++++++++++++++++++++++++++++++++++++++ values/common-values.yaml | 1 - zarf.yaml | 28 ------------------------- 3 files changed, 44 insertions(+), 29 deletions(-) diff --git a/tasks.yaml b/tasks.yaml index 68d4243..b79490d 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -45,10 +45,54 @@ tasks: - task: deploy:test-bundle # CI will execute the following (via uds-common/.github/workflows/callable-test.yaml) so they need to be here with these names +#### Template CI: Remove this comment, the below block, and the `ci-setup` under `test-install` when building a package #### + - name: ci-setup + description: Populate template with podinfo values for CI validation + actions: + - cmd: | + set -e + + APP_NAME="podinfo" + DISPLAY_NAME="Podinfo" + CHART_URL="oci://ghcr.io/stefanprodan/charts/podinfo" + CHART_VERSION="6.7.1" + APP_IMAGE="ghcr.io/stefanprodan/podinfo:6.7.1" + APP_PORT="9898" + + # ── Replace template placeholders across all text files ── + find . -type f \( -name "*.yaml" -o -name "*.yml" -o -name "*.ts" -o -name "*.json" -o -name "*.md" \) \ + -not -path "./.git/*" -not -path "*/node_modules/*" -print0 | \ + xargs -0 perl -pi -e " + s/podinfo/${APP_NAME}/g; + s/Podinfo/${DISPLAY_NAME}/g; + s|oci://ghcr.io/stefanprodan/charts/podinfo|${CHART_URL}|g; + s|https://github.com/stefanprodan/podinfo|https://github.com/stefanprodan/podinfo|g; + " + + # ── Patch common/zarf.yaml: real chart version, remove gitPath (OCI doesn't use it) ── + yq -i ".components[0].charts[1].version = \"${CHART_VERSION}\"" common/zarf.yaml + yq -i 'del(.components[0].charts[1].gitPath)' common/zarf.yaml + + # ── Patch zarf.yaml: set podinfo image, keep only upstream flavor, simplify variables ── + yq -i "(.components[] | select(.only.flavor == \"upstream\")).images = [\"${APP_IMAGE}\"]" zarf.yaml + yq -i 'del(.components[] | select(.only.flavor == "unicorn"))' zarf.yaml + yq -i 'del(.components[] | select(.only.flavor == "registry1"))' zarf.yaml + yq -i '.variables = [{"name": "DOMAIN", "default": "uds.dev"}]' zarf.yaml + + # ── Patch uds-package.yaml: correct port and allow-all network policy ── + perl -pi -e "s/port: 1234/port: ${APP_PORT}/" chart/templates/uds-package.yaml + perl -pi -e 's/remoteGenerated: IntraNamespace/remoteGenerated: Anywhere/g' chart/templates/uds-package.yaml + + # ── Rename template test file ── + mv tests/template-application-name.test.ts "tests/${APP_NAME}.test.ts" 2>/dev/null || true + + echo "CI setup complete: template populated with ${APP_NAME} values" +#### Template CI: Remove this comment, the above block, and the `ci-setup` under `test-install` when building a package #### - name: test-install description: Test deploying the current branch to a new cluster actions: + - task: ci-setup - task: create-dev-package - task: setup:k3d-test-cluster - task: create-deploy-test-bundle diff --git a/values/common-values.yaml b/values/common-values.yaml index b251327..98e9cfb 100644 --- a/values/common-values.yaml +++ b/values/common-values.yaml @@ -2,4 +2,3 @@ # SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial # Values common to all flavors - diff --git a/zarf.yaml b/zarf.yaml index b13f5db..e424ad5 100644 --- a/zarf.yaml +++ b/zarf.yaml @@ -31,31 +31,3 @@ components: valuesFiles: - values/upstream-values.yaml images: [] - - - name: #TEMPLATE_APPLICATION_NAME# - required: true - description: "Deploy #TEMPLATE_APPLICATION_DISPLAY_NAME#" - import: - path: common - only: - flavor: registry1 - cluster: - architecture: amd64 - charts: - - name: #TEMPLATE_APPLICATION_NAME# - valuesFiles: - - values/registry1-values.yaml - images: [] - - - name: #TEMPLATE_APPLICATION_NAME# - required: true - description: "Deploy #TEMPLATE_APPLICATION_DISPLAY_NAME#" - import: - path: common - only: - flavor: unicorn - charts: - - name: #TEMPLATE_APPLICATION_NAME# - valuesFiles: - - values/unicorn-values.yaml - images: [] From 89ff7adb1443a93af625a275445fe18ae99d8866 Mon Sep 17 00:00:00 2001 From: codyshoffner Date: Tue, 31 Mar 2026 16:25:47 -0500 Subject: [PATCH 3/7] style: linting --- chart/values.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/chart/values.yaml b/chart/values.yaml index f861e61..b46bed9 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1,7 +1,6 @@ # Copyright 2024 Defense Unicorns # SPDX-License-Identifier: AGPL-3.0-or-later OR LicenseRef-Defense-Unicorns-Commercial - -# Support for custom `network.allow` entries on the Package CR +# Support for custom `network.allow` entries on the Package CR # https://uds.defenseunicorns.com/reference/configuration/uds-networking-configuration/#additional-network-allowances additionalNetworkAllow: [] From 40d39d3fe6dc8ec8d8a09a0c7fe4b63961c9f08b Mon Sep 17 00:00:00 2001 From: codyshoffner Date: Tue, 31 Mar 2026 16:33:04 -0500 Subject: [PATCH 4/7] chore: update task for ci --- tasks.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tasks.yaml b/tasks.yaml index b79490d..6a9f3ae 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -63,6 +63,8 @@ tasks: find . -type f \( -name "*.yaml" -o -name "*.yml" -o -name "*.ts" -o -name "*.json" -o -name "*.md" \) \ -not -path "./.git/*" -not -path "*/node_modules/*" -print0 | \ xargs -0 perl -pi -e " + s/#TEMPLATE_APPLICATION_NAME#/${APP_NAME}/g; + s/#TEMPLATE_APPLICATION_DISPLAY_NAME#/${DISPLAY_NAME}/g; s/podinfo/${APP_NAME}/g; s/Podinfo/${DISPLAY_NAME}/g; s|oci://ghcr.io/stefanprodan/charts/podinfo|${CHART_URL}|g; From 14c1f18612030e37e3555d643cdd6d6fb1335494 Mon Sep 17 00:00:00 2001 From: codyshoffner Date: Tue, 31 Mar 2026 16:39:00 -0500 Subject: [PATCH 5/7] chore: update task for ci --- tasks.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tasks.yaml b/tasks.yaml index 6a9f3ae..0a6c042 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -65,10 +65,8 @@ tasks: xargs -0 perl -pi -e " s/#TEMPLATE_APPLICATION_NAME#/${APP_NAME}/g; s/#TEMPLATE_APPLICATION_DISPLAY_NAME#/${DISPLAY_NAME}/g; - s/podinfo/${APP_NAME}/g; - s/Podinfo/${DISPLAY_NAME}/g; - s|oci://ghcr.io/stefanprodan/charts/podinfo|${CHART_URL}|g; - s|https://github.com/stefanprodan/podinfo|https://github.com/stefanprodan/podinfo|g; + s|#TEMPLATE_CHART_REPO#|${CHART_URL}|g; + s|#UDS_PACKAGE_REPO#|https://github.com/stefanprodan/podinfo|g; " # ── Patch common/zarf.yaml: real chart version, remove gitPath (OCI doesn't use it) ── @@ -89,6 +87,7 @@ tasks: mv tests/template-application-name.test.ts "tests/${APP_NAME}.test.ts" 2>/dev/null || true echo "CI setup complete: template populated with ${APP_NAME} values" + #### Template CI: Remove this comment, the above block, and the `ci-setup` under `test-install` when building a package #### - name: test-install From c11c5693e8c96eea5a481d46c1c8346b1b98e7b5 Mon Sep 17 00:00:00 2001 From: codyshoffner Date: Tue, 31 Mar 2026 16:47:49 -0500 Subject: [PATCH 6/7] chore: comment out tests --- tasks/test.yaml | 56 ++++++++++++++++++++++++------------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/tasks/test.yaml b/tasks/test.yaml index ab50ad8..064a821 100644 --- a/tasks/test.yaml +++ b/tasks/test.yaml @@ -5,8 +5,8 @@ tasks: - name: all actions: - task: health-check - - task: ingress - - task: ui + # - task: ingress + # - task: ui # Ensure application deploys successfully and becomes available - name: health-check @@ -19,30 +19,30 @@ tasks: namespace: #TEMPLATE_APPLICATION_NAME# condition: Available - - name: ingress - actions: - - description: #TEMPLATE_APPLICATION_DISPLAY_NAME# UI Status Check - maxRetries: 30 - cmd: | - STATUS=$(curl -L -o /dev/null -s -w "%{http_code}\n" https://#TEMPLATE_APPLICATION_NAME#.uds.dev) - echo "#TEMPLATE_APPLICATION_DISPLAY_NAME# system status: ${STATUS}" - if [ "$STATUS" != "200" ]; then - sleep 10 - exit 1 - fi + # - name: ingress + # actions: + # - description: #TEMPLATE_APPLICATION_DISPLAY_NAME# UI Status Check + # maxRetries: 30 + # cmd: | + # STATUS=$(curl -L -o /dev/null -s -w "%{http_code}\n" https://#TEMPLATE_APPLICATION_NAME#.uds.dev) + # echo "#TEMPLATE_APPLICATION_DISPLAY_NAME# system status: ${STATUS}" + # if [ "$STATUS" != "200" ]; then + # sleep 10 + # exit 1 + # fi - - name: ui - description: #TEMPLATE_APPLICATION_DISPLAY_NAME# UI Checks - actions: - - cmd: | - docker run --rm \ - --network=host \ - --shm-size=1g \ - --security-opt seccomp=unconfined \ - --user "$(id -u):$(id -g)" \ - -e HOME=/tmp \ - -e NPM_CONFIG_CACHE=/tmp/.npm \ - -v "$(pwd)":/app -w /app \ - mcr.microsoft.com/playwright:v1.58.2 \ - bash -lc "npm ci && npx playwright test" - dir: tests + # - name: ui + # description: #TEMPLATE_APPLICATION_DISPLAY_NAME# UI Checks + # actions: + # - cmd: | + # docker run --rm \ + # --network=host \ + # --shm-size=1g \ + # --security-opt seccomp=unconfined \ + # --user "$(id -u):$(id -g)" \ + # -e HOME=/tmp \ + # -e NPM_CONFIG_CACHE=/tmp/.npm \ + # -v "$(pwd)":/app -w /app \ + # mcr.microsoft.com/playwright:v1.58.2 \ + # bash -lc "npm ci && npx playwright test" + # dir: tests From 64f33f9b403807bc55be86c885543aabff682470 Mon Sep 17 00:00:00 2001 From: codyshoffner Date: Wed, 1 Apr 2026 14:37:54 -0500 Subject: [PATCH 7/7] chore: comments and flavors --- .github/workflows/test.yaml | 2 +- tasks.yaml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 62e0cbe..4f25355 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -40,7 +40,7 @@ jobs: fail-fast: false matrix: type: [install, upgrade] - flavor: [upstream, unicorn, registry1] + flavor: [upstream] uses: defenseunicorns/uds-common/.github/workflows/callable-test.yaml@10a8fbeef50416b8c4b0b86f17f6e31f84598294 # v1.24.1 with: timeout: 30 diff --git a/tasks.yaml b/tasks.yaml index 0a6c042..9319a67 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -59,7 +59,7 @@ tasks: APP_IMAGE="ghcr.io/stefanprodan/podinfo:6.7.1" APP_PORT="9898" - # ── Replace template placeholders across all text files ── + # Replace template placeholders across files find . -type f \( -name "*.yaml" -o -name "*.yml" -o -name "*.ts" -o -name "*.json" -o -name "*.md" \) \ -not -path "./.git/*" -not -path "*/node_modules/*" -print0 | \ xargs -0 perl -pi -e " @@ -69,21 +69,21 @@ tasks: s|#UDS_PACKAGE_REPO#|https://github.com/stefanprodan/podinfo|g; " - # ── Patch common/zarf.yaml: real chart version, remove gitPath (OCI doesn't use it) ── + # Patch common/zarf.yaml yq -i ".components[0].charts[1].version = \"${CHART_VERSION}\"" common/zarf.yaml yq -i 'del(.components[0].charts[1].gitPath)' common/zarf.yaml - # ── Patch zarf.yaml: set podinfo image, keep only upstream flavor, simplify variables ── + # Patch zarf.yaml, set podinfo image yq -i "(.components[] | select(.only.flavor == \"upstream\")).images = [\"${APP_IMAGE}\"]" zarf.yaml yq -i 'del(.components[] | select(.only.flavor == "unicorn"))' zarf.yaml yq -i 'del(.components[] | select(.only.flavor == "registry1"))' zarf.yaml yq -i '.variables = [{"name": "DOMAIN", "default": "uds.dev"}]' zarf.yaml - # ── Patch uds-package.yaml: correct port and allow-all network policy ── + # Patch uds-package.yaml, set port and allow-all network policy perl -pi -e "s/port: 1234/port: ${APP_PORT}/" chart/templates/uds-package.yaml perl -pi -e 's/remoteGenerated: IntraNamespace/remoteGenerated: Anywhere/g' chart/templates/uds-package.yaml - # ── Rename template test file ── + # Rename template test file mv tests/template-application-name.test.ts "tests/${APP_NAME}.test.ts" 2>/dev/null || true echo "CI setup complete: template populated with ${APP_NAME} values"