Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: defenseunicorns/uds-common
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.9.0
Choose a base ref
...
head repository: defenseunicorns/uds-common
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.10.0
Choose a head ref
  • 2 commits
  • 8 files changed
  • 2 contributors

Commits on Jul 29, 2024

  1. feat: add task for determining target repo based on flavor (#188)

    Marshall Cottrell authored Jul 29, 2024
    Copy the full SHA
    6810324 View commit details

Commits on Jul 30, 2024

  1. chore(main): release 0.10.0 (#190)

    Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
    github-actions[bot] authored Jul 30, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e7c0643 View commit details
Showing with 78 additions and 22 deletions.
  1. +1 −1 .release-please-manifest.json
  2. +7 −0 CHANGELOG.md
  3. +2 −2 bundle/uds-bundle.yaml
  4. +1 −1 tasks.yaml
  5. +16 −8 tasks/publish.yaml
  6. +14 −9 tasks/pull.yaml
  7. +36 −0 tasks/utils.yaml
  8. +1 −1 zarf.yaml
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.9.0"
".": "0.10.0"
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.10.0](https://github.com/defenseunicorns/uds-common/compare/v0.9.0...v0.10.0) (2024-07-29)


### Features

* add task for determining target repo based on flavor ([#188](https://github.com/defenseunicorns/uds-common/issues/188)) ([6810324](https://github.com/defenseunicorns/uds-common/commit/681032402a315c8db80975571242ed8db73e78bf))

## [0.9.0](https://github.com/defenseunicorns/uds-common/compare/v0.8.2...v0.9.0) (2024-07-23)


4 changes: 2 additions & 2 deletions bundle/uds-bundle.yaml
Original file line number Diff line number Diff line change
@@ -3,12 +3,12 @@ metadata:
name: test
description: The testing UDS bundle
# x-release-please-start-version
version: 0.9.0
version: 0.10.0
# x-release-please-end

packages:
- name: podinfo
path: ../
# x-release-please-start-version
ref: 0.9.0
ref: 0.10.0
# x-release-please-end
2 changes: 1 addition & 1 deletion tasks.yaml
Original file line number Diff line number Diff line change
@@ -53,7 +53,7 @@ tasks:
task: publish:package
with:
# x-release-please-start-version
version: 0.9.0
version: 0.10.0
# x-release-please-end

- name: test
24 changes: 16 additions & 8 deletions tasks/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
includes:
- utils: https://raw.githubusercontent.com/defenseunicorns/uds-common/7d5f445a50b19e97b9a8bed0d2445654ae05bab6/tasks/utils.yaml

variables:
- name: FLAVOR
default: upstream

tasks:
- name: package
description: Publish package for the supplied architecture
@@ -11,13 +18,16 @@ tasks:
architecture:
description: The architecture of the package to publish
default: ${UDS_ARCH}
target_repo:
description: The repository to publish into
default: ghcr.io/defenseunicorns/packages/uds
team:
description: The team publishing the package
default: uds
actions:
- task: utils:determine-repo
with:
team: ${{.inputs.team}}
- description: Publish package for the supplied architecture
cmd: |
./uds zarf package publish ${{ .inputs.path }}/zarf-package-*-${{ .inputs.architecture }}-${{ .inputs.version }}.tar.zst oci://${{ .inputs.target_repo }}
./uds zarf package publish ${{ .inputs.path }}/zarf-package-*-${{ .inputs.architecture }}-${{ .inputs.version }}.tar.zst oci://${TARGET_REPO}
- name: test-bundle
description: Publish bundle for the supplied architecture
@@ -31,10 +41,8 @@ tasks:
architecture:
description: The architecture of the bundle to publish
default: ${UDS_ARCH}
target_repo:
description: The repository to publish into
default: ghcr.io/defenseunicorns/packages/uds/bundles
actions:
- task: utils:determine-repo
- description: Publish bundle for the supplied architecture
cmd: |
./uds publish ${{ .inputs.path }}/uds-bundle-*-${{ .inputs.architecture }}-${{ .inputs.version }}.tar.zst oci://${{ .inputs.target_repo }} --no-progress
./uds publish ${{ .inputs.path }}/uds-bundle-*-${{ .inputs.architecture }}-${{ .inputs.version }}.tar.zst oci://${TARGET_REPO}/bundles --no-progress
23 changes: 14 additions & 9 deletions tasks/pull.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
includes:
- utils: https://raw.githubusercontent.com/defenseunicorns/uds-common/7d5f445a50b19e97b9a8bed0d2445654ae05bab6/tasks/utils.yaml

variables:
- name: FLAVOR
default: upstream
- name: TARGET_REPO
default: ghcr.io/defenseunicorns/packages/uds

tasks:
- name: latest-package-release
@@ -13,20 +14,23 @@ tasks:
spoof_release:
description: Whether to spoof the pulled package version to the current repo version
default: "false"
target_repo:
description: The repository to pull from
default: ghcr.io/defenseunicorns/packages/uds
team:
description: The team you want to pull the package from
default: uds
actions:
- task: utils:determine-repo
with:
team: ${{.inputs.team}}
- description: Get the current Zarf package name
cmd: cat ${{ .inputs.path }}/zarf.yaml | yq .metadata.name
setVariables:
- name: PACKAGE_NAME
- description: Get latest tag version from OCI
cmd: ./uds zarf tools registry ls ${{ .inputs.target_repo }}/${PACKAGE_NAME} | grep ${FLAVOR} | sort -V | tail -1
cmd: ./uds zarf tools registry ls ${TARGET_REPO}/${PACKAGE_NAME} | grep ${FLAVOR} | sort -V | tail -1
setVariables:
- name: LATEST_VERSION
- description: Pull the latest package release
cmd: ./uds zarf package pull oci://${{ .inputs.target_repo }}/${PACKAGE_NAME}:${LATEST_VERSION} --no-progress -o ${{ .inputs.path }}
cmd: ./uds zarf package pull oci://${TARGET_REPO}/${PACKAGE_NAME}:${LATEST_VERSION} --no-progress -o ${{ .inputs.path }}
# TODO (@WSTARR): This is currently needed to get around the chicken+egg condition when release please updates the version in GH
- description: Spoof the latest release to the current version
cmd: |
@@ -47,16 +51,17 @@ tasks:
description: The repository to pull from
default: ghcr.io/defenseunicorns/packages/uds/bundles
actions:
- task: utils:determine-repo
- description: Get the current uds bundle name
cmd: cat ${{ .inputs.path }}/uds-bundle.yaml | yq .metadata.name
setVariables:
- name: BUNDLE_NAME
- description: Get latest tag version from OCI
cmd: ./uds zarf tools registry ls ${{ .inputs.target_repo }}/${BUNDLE_NAME} | sort -V | tail -1
cmd: ./uds zarf tools registry ls ${TARGET_REPO}/bundles/${BUNDLE_NAME} | sort -V | tail -1
setVariables:
- name: LATEST_VERSION
- description: Pull the latest bundle release
cmd: ./uds pull oci://${{ .inputs.target_repo }}/${BUNDLE_NAME}:${LATEST_VERSION} --no-progress -o ${{ .inputs.path }}
cmd: ./uds pull oci://${TARGET_REPO}/bundles/${BUNDLE_NAME}:${LATEST_VERSION} --no-progress -o ${{ .inputs.path }}
# TODO (@ZMILLER): This is currently needed to get around the chicken+egg condition when release please updates the version in GH
- description: Spoof the latest release to the current version
cmd: |
36 changes: 36 additions & 0 deletions tasks/utils.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
variables:
- name: FLAVOR
default: upstream

tasks:
- name: determine-repo
inputs:
base_repo:
description: The base repository to publish into
default: ghcr.io/defenseunicorns/packages
team:
description: The team publishing the package
default: uds
flavor:
description: The flavor of the package to publish
default: ${FLAVOR}
snapshot:
description: Whether this is a snapshot release
default: "false"
actions:
- description: Determine repository for the given flavor/type of release
cmd: |
repo="${{.inputs.base_repo}}"
# unicorn flavor = private repository
if [ "${{.inputs.flavor}}" = "unicorn" ]; then
repo="${repo}/private"
fi
repo="${repo}/${{.inputs.team}}"
# snapshots = snapshot repository
if [ "${{.inputs.snapshot}}" = "true" ]; then
repo="${repo}/snapshots"
fi
echo "${repo}"
mute: true
setVariables:
- name: TARGET_REPO
2 changes: 1 addition & 1 deletion zarf.yaml
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@ kind: ZarfPackageConfig
metadata:
name: podinfo
# x-release-please-start-version
version: 0.9.0
version: 0.10.0
# x-release-please-end

components: