Skip to content

Commit

Permalink
chore: add flavor to pepr build task (#238)
Browse files Browse the repository at this point in the history
## Description
Use the registry1 pepr controller image when creating a registry1
flavored uds package.

> Warning
> Iron Bank stays at least a few days behind on releasing 
> the latest version of pepr.  So pepr is currently at `0.27.0`,
> but the latest IB image version is `v0.26.2`


> Note
> Wanted to do an options `input` but didn't have a clean way to
> run the conditional check for setting the image at the top level 
> instead of in tasks that call `pepr-build`

## Related Issue

Resolves #222 

## 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

- [ ] Test, docs, adr added or updated as needed
- [x] [Contributor Guide
Steps](https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md)(https://github.com/defenseunicorns/uds-template-capability/blob/main/CONTRIBUTING.md#submitting-a-pull-request)
followed
  • Loading branch information
TristanHoladay authored Mar 13, 2024
1 parent 50f6c90 commit 29bf8a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 2 additions & 2 deletions renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
{
"fileMatch": ["\\.*\\.ya?ml$"],
"matchStrings": [
"# renovate: datasource=docker( versioning=(?<versioning>.*?))?\n\\s*-\\s+(?<depName>[^:]+):(?<currentValue>.*)"
"# renovate: datasource=docker( versioning=(?<versioning>.*?))?\n\\s+.+:(?<depName>[^:]+):(?<currentValue>.*)"
],
"datasourceTemplate": "docker"
},
Expand Down Expand Up @@ -238,7 +238,7 @@
"pinDigests": true
},
{
"matchFileNames": ["package.json", "package-lock.json"],
"matchFileNames": ["package.json", "package-lock.json", "tasks/create.yaml"],
"groupName": "pepr",
"commitMessageTopic": "pepr"
}
Expand Down
7 changes: 6 additions & 1 deletion tasks/create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ variables:
- name: FLAVOR
default: upstream

- name: REGISTRY1_PEPR_IMAGE
# renovate: datasource=docker versioning=semver
default: registry1.dso.mil/ironbank/opensource/defenseunicorns/pepr/controller:v0.27.0

tasks:
- name: standard-package
description: "Create the UDS Core Zarf Package"
Expand Down Expand Up @@ -47,6 +51,7 @@ tasks:
actions:
- description: "Build the UDS Core Pepr Module"
cmd: |
CUSTOM_PEPR_IMAGE=$( [ "${FLAVOR}" = "registry1" ] && echo "--custom-image ${REGISTRY1_PEPR_IMAGE}" ) || CUSTOM_PEPR_IMAGE=""
rm -fr dist
npm ci
npx pepr build
npx pepr build $CUSTOM_PEPR_IMAGE

0 comments on commit 29bf8a3

Please sign in to comment.