From e624d73f79bd6739b6808fbdbf5ca75ebb7c1d3c Mon Sep 17 00:00:00 2001 From: Case Wylie Date: Mon, 16 Sep 2024 19:15:02 -0400 Subject: [PATCH] chore: task for custom pepr (#766) ## Description This allows a custom release candidate image of pepr to be run with UDS Core for CI testing ## Related Issue Fixes #760 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 - [x] Test, docs, adr added or updated as needed - [x] [Contributor Guide](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md) followed Signed-off-by: Case Wylie --- tasks/create.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tasks/create.yaml b/tasks/create.yaml index 569e19d50..80626136b 100644 --- a/tasks/create.yaml +++ b/tasks/create.yaml @@ -60,7 +60,14 @@ tasks: actions: - description: "Build the UDS Core Pepr Module" cmd: | - CUSTOM_PEPR_IMAGE=$( [ "${FLAVOR}" = "registry1" ] && echo "--custom-image ${REGISTRY1_PEPR_IMAGE}" ) || CUSTOM_PEPR_IMAGE="" + if [ -n "${PEPR_CUSTOM_IMAGE}" ] ; then + # e.g. PEPR_CUSTOM_IMAGE="pepr:dev uds run slim-dev" + PEPR_OVERRIDE_IMAGE="--custom-image ${PEPR_CUSTOM_IMAGE}" + elif [ "${FLAVOR}" = "registry1" ] ; then + PEPR_OVERRIDE_IMAGE="--custom-image ${REGISTRY1_PEPR_IMAGE}" + else + PEPR_OVERRIDE_IMAGE="" + fi rm -fr dist npm ci - npx pepr build -z chart $CUSTOM_PEPR_IMAGE + npx pepr build -z chart $PEPR_OVERRIDE_IMAGE