Skip to content

Commit

Permalink
fix: snapshot ci version modification and tasks for publish (#877)
Browse files Browse the repository at this point in the history
## Description

Snapshot CI has been failing due to our changes to the slim-dev
package/bundle:
https://github.com/defenseunicorns/uds-core/actions/workflows/snapshot-release.yaml.
This fixes our yq commands to update the new layer packages and bundle
locations as expected.

This same change was added on the pepr branch and validated:
https://github.com/defenseunicorns/uds-core/actions/runs/11244510863

## Related Issue

N/A

## Type of change

- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] 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
  • Loading branch information
mjnagel authored Oct 9, 2024
1 parent 43c98ce commit f01e5bd
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,22 @@ jobs:
if: ${{ inputs.snapshot }}
run: |
yq -ei '.metadata.version=env(SNAPSHOT_VERSION), (.packages[]|select(has("ref"))|select(.name=="core")).ref=env(SNAPSHOT_VERSION)' bundles/k3d-standard/uds-bundle.yaml
yq -ei '.metadata.version=env(SNAPSHOT_VERSION), (.packages[]|select(has("ref"))|select(.name=="core-slim-dev")).ref=env(SNAPSHOT_VERSION)' bundles/k3d-slim-dev/uds-bundle.yaml
yq -ei '.metadata.version=env(SNAPSHOT_VERSION), (.packages[]|select(has("ref"))|select(.name=="core-base")).ref=env(SNAPSHOT_VERSION)' bundles/k3d-slim-dev/uds-bundle.yaml
yq -ei '.metadata.version=env(SNAPSHOT_VERSION), (.packages[]|select(has("ref"))|select(.name=="core-identity-authorization")).ref=env(SNAPSHOT_VERSION)' bundles/k3d-slim-dev/uds-bundle.yaml
yq -ei '.metadata.version=env(SNAPSHOT_VERSION)' packages/standard/zarf.yaml
yq -ei '.metadata.version=env(SNAPSHOT_VERSION)' packages/slim-dev/zarf.yaml
yq -ei '.metadata.version=env(SNAPSHOT_VERSION)' packages/base/zarf.yaml
yq -ei '.metadata.version=env(SNAPSHOT_VERSION)' packages/identity-authorization/zarf.yaml
- name: Create Packages and Bundles
run: |
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml standard-package --no-progress --set FLAVOR=${{ matrix.flavor }}
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml k3d-standard-bundle --no-progress
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml slim-dev-package --no-progress --set FLAVOR=${{ matrix.flavor }}
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml k3d-slim-dev-bundle --no-progress
ZARF_ARCHITECTURE=amd64 uds run -f tasks/create.yaml k3d-slim-dev-bundle --no-progress --set FLAVOR=${{ matrix.flavor }}
if [ "${{ matrix.flavor }}" != "registry1" ]; then
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml standard-package --no-progress --set FLAVOR=${{ matrix.flavor }}
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml k3d-standard-bundle --no-progress
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml slim-dev-package --no-progress --set FLAVOR=${{ matrix.flavor }}
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml k3d-slim-dev-bundle --no-progress
ZARF_ARCHITECTURE=arm64 uds run -f tasks/create.yaml k3d-slim-dev-bundle --no-progress --set FLAVOR=${{ matrix.flavor }}
fi
# Standard Package by default tests full core
Expand Down
10 changes: 0 additions & 10 deletions tasks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,6 @@ tasks:
- name: slim-dev
actions:
- description: "Create base package"
task: create:single-layer
with:
layer: base

- description: "Create identity-authorization package"
task: create:single-layer
with:
layer: identity-authorization

- description: "Build slim dev bundle"
task: create:k3d-slim-dev-bundle

Expand Down
10 changes: 10 additions & 0 deletions tasks/create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ tasks:
- name: k3d-slim-dev-bundle
description: "Create the slim dev bundle (Base and Identity)"
actions:
- description: "Create base package"
task: single-layer
with:
layer: base

- description: "Create identity-authorization package"
task: single-layer
with:
layer: identity-authorization

- description: "Create the slim dev bundle (Base and Identity)"
cmd: "uds create bundles/k3d-slim-dev --confirm --no-progress --architecture=${ZARF_ARCHITECTURE}"

Expand Down

0 comments on commit f01e5bd

Please sign in to comment.