Skip to content

Commit

Permalink
chore(deps): update zarf to v0.32.2 (#355)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: unclegedd <[email protected]>
  • Loading branch information
renovate[bot] and UncleGedd committed Jan 29, 2024
1 parent 0112780 commit 613187e
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 52 deletions.
2 changes: 1 addition & 1 deletion .github/actions/zarf/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ runs:
- uses: defenseunicorns/setup-zarf@main
with:
# renovate: datasource=github-tags depName=defenseunicorns/zarf
version: v0.32.1
version: v0.32.2
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21.5
require (
github.com/AlecAivazis/survey/v2 v2.3.7
github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b
github.com/defenseunicorns/zarf v0.32.1
github.com/defenseunicorns/zarf v0.32.2
github.com/goccy/go-yaml v1.11.2
github.com/mholt/archiver/v3 v3.5.1
github.com/mholt/archiver/v4 v4.0.0-alpha.8
Expand Down Expand Up @@ -84,15 +84,15 @@ require (
github.com/alibabacloud-go/tea-xml v1.1.3 // indirect
github.com/aliyun/credentials-go v1.3.1 // indirect
github.com/anchore/bubbly v0.0.0-20231115134915-def0aba654a9 // indirect
github.com/anchore/clio v0.0.0-20231220164737-3e50431641a5 // indirect
github.com/anchore/clio v0.0.0-20240118133543-a5e93b68d716 // indirect
github.com/anchore/fangs v0.0.0-20231201140849-5075d28d6d8b // indirect
github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a // indirect
github.com/anchore/go-macholibre v0.0.0-20220308212642-53e6d0aaf6fb // indirect
github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 // indirect
github.com/anchore/go-version v1.2.2-0.20210903204242-51efa5b487c4 // indirect
github.com/anchore/grype v0.73.5 // indirect
github.com/anchore/packageurl-go v0.1.1-0.20230104203445-02e0a6721501 // indirect
github.com/anchore/stereoscope v0.0.0-20231220161148-590920dabc54 // indirect
github.com/anchore/stereoscope v0.0.0-20240118133533-eb656fc71793 // indirect
github.com/anchore/syft v0.99.0 // indirect
github.com/andybalholm/brotli v1.0.6 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
Expand Down Expand Up @@ -142,7 +142,7 @@ require (
github.com/charmbracelet/lipgloss v0.9.1 // indirect
github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 // indirect
github.com/clbanning/mxj/v2 v2.7.0 // indirect
github.com/cloudflare/circl v1.3.5 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cockroachdb/apd/v3 v3.2.1 // indirect
github.com/common-nighthawk/go-figure v0.0.0-20210622060536-734e95fb86be // indirect
github.com/connesc/cipherio v0.2.1 // indirect
Expand Down
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ github.com/aliyun/credentials-go v1.3.1 h1:uq/0v7kWrxmoLGpqjx7vtQ/s03f0zR//0br/x
github.com/aliyun/credentials-go v1.3.1/go.mod h1:8jKYhQuDawt8x2+fusqa1Y6mPxemTsBEN04dgcAcYz0=
github.com/anchore/bubbly v0.0.0-20231115134915-def0aba654a9 h1:p0ZIe0htYOX284Y4axJaGBvXHU0VCCzLN5Wf5XbKStU=
github.com/anchore/bubbly v0.0.0-20231115134915-def0aba654a9/go.mod h1:3ZsFB9tzW3vl4gEiUeuSOMDnwroWxIxJelOOHUp8dSw=
github.com/anchore/clio v0.0.0-20231220164737-3e50431641a5 h1:YeSfEYlpOxtyYjzt5dWOJ8vUAt2I7o++OzznWaMVj3Q=
github.com/anchore/clio v0.0.0-20231220164737-3e50431641a5/go.mod h1:cR5yj3XAfDMw/4tPXIpMI4tTN4t8APhzaAUQ5x3CaBE=
github.com/anchore/clio v0.0.0-20240118133543-a5e93b68d716 h1:v7XeMQb2s71+jworyxo346Ng1aLv4dqALu397xW8TdE=
github.com/anchore/clio v0.0.0-20240118133543-a5e93b68d716/go.mod h1:5BGBD6yira9bK2N4Czz2rGnkdTq7oPAxBG1NZqfDoPU=
github.com/anchore/fangs v0.0.0-20231201140849-5075d28d6d8b h1:L/djgY7ZbZ/38+wUtdkk398W3PIBJLkt1N8nU/7e47A=
github.com/anchore/fangs v0.0.0-20231201140849-5075d28d6d8b/go.mod h1:TLcE0RE5+8oIx2/NPWem/dq1DeaMoC+fPEH7hoSzPLo=
github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a h1:nJ2G8zWKASyVClGVgG7sfM5mwoZlZ2zYpIzN2OhjWkw=
Expand All @@ -382,8 +382,8 @@ github.com/anchore/grype v0.73.5 h1:1X81Snj5pGpl9ru7mQl1eYLX1Ek2ElfKhm9cwIgdCOw=
github.com/anchore/grype v0.73.5/go.mod h1:bdI7d2XeXQbmfbqql/Fqg+Lv2w4gO3nN3jfby/mBIcs=
github.com/anchore/packageurl-go v0.1.1-0.20230104203445-02e0a6721501 h1:AV7qjwMcM4r8wFhJq3jLRztew3ywIyPTRapl2T1s9o8=
github.com/anchore/packageurl-go v0.1.1-0.20230104203445-02e0a6721501/go.mod h1:Blo6OgJNiYF41ufcgHKkbCKF2MDOMlrqhXv/ij6ocR4=
github.com/anchore/stereoscope v0.0.0-20231220161148-590920dabc54 h1:i2YK5QEs9H2YB3B2zv+AGR44ves0nmAGOD07lMphH14=
github.com/anchore/stereoscope v0.0.0-20231220161148-590920dabc54/go.mod h1:IylG7ofLoUKHwS1XDF6rPhOmaE3GgpAgsMdvvYfooTU=
github.com/anchore/stereoscope v0.0.0-20240118133533-eb656fc71793 h1:wji+qdjsV7ooolBwb3faVZnEK3WtY/kcT5473kxVZS4=
github.com/anchore/stereoscope v0.0.0-20240118133533-eb656fc71793/go.mod h1:IylG7ofLoUKHwS1XDF6rPhOmaE3GgpAgsMdvvYfooTU=
github.com/anchore/syft v0.99.0 h1:oqycIA7XfHCB09meroN7eY2RWTGUZIdtWsMQL2HlPvw=
github.com/anchore/syft v0.99.0/go.mod h1:tGZGyDxB2z/yu+x266+b67fMenGKCrUvSNVKED1euuo=
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8=
Expand Down Expand Up @@ -536,8 +536,8 @@ github.com/clbanning/mxj/v2 v2.7.0 h1:WA/La7UGCanFe5NpHF0Q3DNtnCsVoxbPKuyBNHWRyM
github.com/clbanning/mxj/v2 v2.7.0/go.mod h1:hNiWqW14h+kc+MdF9C6/YoRfjEJoR3ou6tn/Qo+ve2s=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
github.com/cloudflare/circl v1.3.5 h1:g+wWynZqVALYAlpSQFAa7TscDnUK8mKYtrxMpw6AUKo=
github.com/cloudflare/circl v1.3.5/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA=
github.com/cloudflare/circl v1.3.7 h1:qlCDlTPz2n9fu58M0Nh1J/JzcFpfgkFHHX3O35r5vcU=
github.com/cloudflare/circl v1.3.7/go.mod h1:sRTcRWXGLrKw6yIGJ+l7amYJFfAXbZG0kBSc8r4zxgA=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
Expand Down Expand Up @@ -601,8 +601,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/daviddengcn/go-colortext v1.0.0 h1:ANqDyC0ys6qCSvuEK7l3g5RaehL/Xck9EX8ATG8oKsE=
github.com/daviddengcn/go-colortext v1.0.0/go.mod h1:zDqEI5NVUop5QPpVJUxE9UO10hRnmkD5G4Pmri9+m4c=
github.com/defenseunicorns/zarf v0.32.1 h1:dfws/gFaEXd5nFFXItZLImFuhrjH7qyWDRcMR8wdfS4=
github.com/defenseunicorns/zarf v0.32.1/go.mod h1:Su71Ec7QwJql06gRGgqpj2yAJhPfDnq/HGeMKqBvhW4=
github.com/defenseunicorns/zarf v0.32.2 h1:GfBGMS2acSKclSGXm+KuoavgA+sfJ97ektZVmSR7SW4=
github.com/defenseunicorns/zarf v0.32.2/go.mod h1:OeeuoiEFd+PAS10YPr2JDqyHxbtcuNlE62mqu1S5i1c=
github.com/deitch/magic v0.0.0-20230404182410-1ff89d7342da h1:ZOjWpVsFZ06eIhnh4mkaceTiVoktdU67+M7KDHJ268M=
github.com/deitch/magic v0.0.0-20230404182410-1ff89d7342da/go.mod h1:B3tI9iGHi4imdLi4Asdha1Sc6feLMTfPLXh9IUYmysk=
github.com/depcheck-test/depcheck-test v0.0.0-20220607135614-199033aaa936 h1:foGzavPWwtoyBvjWyKJYDYsyzy+23iBV7NKTwdk+LRY=
Expand Down
7 changes: 6 additions & 1 deletion src/pkg/bundle/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"github.com/defenseunicorns/zarf/src/pkg/oci"
"github.com/defenseunicorns/zarf/src/pkg/utils"
"github.com/defenseunicorns/zarf/src/pkg/utils/helpers"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/pterm/pterm"
"oras.land/oras-go/v2/registry"
)
Expand Down Expand Up @@ -100,7 +101,11 @@ func (b *Bundler) Create() error {
if err != nil {
return err
}
remote, err := oci.NewOrasRemote(ref, oci.WithArch(config.GetArch()))
platform := ocispec.Platform{
Architecture: config.GetArch(),
OS: oci.MultiOS,
}
remote, err := oci.NewOrasRemote(ref, platform)
if err != nil {
return err
}
Expand Down
7 changes: 6 additions & 1 deletion src/pkg/bundle/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/defenseunicorns/uds-cli/src/types"
"github.com/defenseunicorns/zarf/src/pkg/oci"
"github.com/defenseunicorns/zarf/src/pkg/utils/helpers"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)

// Provider is an interface for processing bundles
Expand Down Expand Up @@ -55,7 +56,11 @@ type PathMap map[string]string
func NewBundleProvider(ctx context.Context, source, destination string) (Provider, error) {
if helpers.IsOCIURL(source) {
provider := ociProvider{ctx: ctx, src: source, dst: destination}
remote, err := oci.NewOrasRemote(source, oci.WithArch(config.GetArch()))
platform := ocispec.Platform{
Architecture: config.GetArch(),
OS: oci.MultiOS,
}
remote, err := oci.NewOrasRemote(source, platform)
if err != nil {
return nil, err
}
Expand Down
7 changes: 6 additions & 1 deletion src/pkg/bundle/publish.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/defenseunicorns/zarf/src/pkg/oci"
"github.com/defenseunicorns/zarf/src/pkg/utils"
av3 "github.com/mholt/archiver/v3"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)

// Publish publishes a bundle to a remote OCI registry
Expand Down Expand Up @@ -48,7 +49,11 @@ func (b *Bundler) Publish() error {
ociURL := b.cfg.PublishOpts.Destination
bundleName := b.bundle.Metadata.Name
bundleTag := b.bundle.Metadata.Version
remote, err := oci.NewOrasRemote(fmt.Sprintf("%s/%s:%s", ociURL, bundleName, bundleTag), oci.WithArch(config.GetArch()))
platform := ocispec.Platform{
Architecture: config.GetArch(),
OS: oci.MultiOS,
}
remote, err := oci.NewOrasRemote(fmt.Sprintf("%s/%s:%s", ociURL, bundleName, bundleTag), platform)
if err != nil {
return err
}
Expand Down
6 changes: 5 additions & 1 deletion src/pkg/bundle/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ func (b *Bundler) Pull() error {
}

// create a remote client just to resolve the root descriptor
remote, err := oci.NewOrasRemote(b.cfg.PullOpts.Source, oci.WithArch(config.GetArch()))
platform := ocispec.Platform{
Architecture: config.GetArch(),
OS: oci.MultiOS,
}
remote, err := oci.NewOrasRemote(b.cfg.PullOpts.Source, platform)
if err != nil {
return err
}
Expand Down
12 changes: 8 additions & 4 deletions src/pkg/bundle/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,13 @@ func (op *ociProvider) PublishBundle(_ types.UDSBundle, _ *oci.OrasRemote) error
func getOCIValidatedSource(source string) (string, error) {
originalSource := source

platform := ocispec.Platform{
Architecture: config.GetArch(),
OS: oci.MultiOS,
}
// Check provided repository path
sourceWithOCI := EnsureOCIPrefix(source)
remote, err := oci.NewOrasRemote(sourceWithOCI, oci.WithArch(config.GetArch()))
remote, err := oci.NewOrasRemote(sourceWithOCI, platform)
if err == nil {
source = sourceWithOCI
_, err = remote.ResolveRoot()
Expand All @@ -267,23 +271,23 @@ func getOCIValidatedSource(source string) (string, error) {
if err != nil {
// Check in ghcr uds bundle path
source = GHCRUDSBundlePath + originalSource
remote, err = oci.NewOrasRemote(source, oci.WithArch(config.GetArch()))
remote, err = oci.NewOrasRemote(source, platform)
if err == nil {
_, err = remote.ResolveRoot()
}
if err != nil {
message.Debugf("%s: not found", source)
// Check in delivery bundle path
source = GHCRDeliveryBundlePath + originalSource
remote, err = oci.NewOrasRemote(source, oci.WithArch(config.GetArch()))
remote, err = oci.NewOrasRemote(source, platform)
if err == nil {
_, err = remote.ResolveRoot()
}
if err != nil {
message.Debugf("%s: not found", source)
// Check in packages bundle path
source = GHCRPackagesPath + originalSource
remote, err = oci.NewOrasRemote(source, oci.WithArch(config.GetArch()))
remote, err = oci.NewOrasRemote(source, platform)
if err == nil {
_, err = remote.ResolveRoot()
}
Expand Down
12 changes: 10 additions & 2 deletions src/pkg/bundler/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ type RemoteBundler struct {
// NewRemoteBundler creates a bundler to pull remote Zarf pkgs
// todo: document this fn better or break out into multiple constructors
func NewRemoteBundler(pkg types.Package, url string, localDst *ocistore.Store, remoteDst *oci.OrasRemote, tmpDir string) (RemoteBundler, error) {
src, err := oci.NewOrasRemote(url, oci.WithArch(config.GetArch()))
platform := ocispec.Platform{
Architecture: config.GetArch(),
OS: oci.MultiOS,
}
src, err := oci.NewOrasRemote(url, platform)
if err != nil {
return RemoteBundler{}, err
}
Expand All @@ -55,7 +59,11 @@ func NewRemoteBundler(pkg types.Package, url string, localDst *ocistore.Store, r

// GetMetadata grabs metadata from a remote Zarf package's zarf.yaml
func (b *RemoteBundler) GetMetadata(url string, tmpDir string) (zarfTypes.ZarfPackage, error) {
remote, err := oci.NewOrasRemote(url, oci.WithArch(config.GetArch()))
platform := ocispec.Platform{
Architecture: config.GetArch(),
OS: oci.MultiOS,
}
remote, err := oci.NewOrasRemote(url, platform)
if err != nil {
return zarfTypes.ZarfPackage{}, err
}
Expand Down
7 changes: 6 additions & 1 deletion src/pkg/sources/new.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/defenseunicorns/zarf/src/pkg/oci"
zarfSources "github.com/defenseunicorns/zarf/src/pkg/packager/sources"
zarfTypes "github.com/defenseunicorns/zarf/src/types"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
)

// New creates a new package source based on pkgLocation
Expand All @@ -25,7 +26,11 @@ func New(pkgLocation string, pkgName string, opts zarfTypes.ZarfPackageOptions,
BundleLocation: pkgLocation,
}
} else {
remote, err := oci.NewOrasRemote(pkgLocation, oci.WithArch(config.GetArch()))
platform := ocispec.Platform{
Architecture: config.GetArch(),
OS: oci.MultiOS,
}
remote, err := oci.NewOrasRemote(pkgLocation, platform)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions src/test/bundles/04-init/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ packages:
- name: init
path: "../../packages"
# renovate: datasource=github-tags depName=defenseunicorns/zarf
ref: v0.32.1
ref: v0.32.2
optional-components:
- git-server
- name: init
repository: ghcr.io/defenseunicorns/packages/init
# renovate: datasource=github-tags depName=defenseunicorns/zarf
ref: v0.32.1
ref: v0.32.2
optional-components:
- git-server
21 changes: 2 additions & 19 deletions src/test/e2e/ghcr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,32 +84,15 @@ func TestBundleCreateAndDeployGHCR(t *testing.T) {
// ghcr.io/defenseunicorns/packages/delivery/ghcr-delivery-test:0.0.1
// The default bundle location if no source path provided is defenseunicorns/packages/uds/bundles/"
func TestGHCRPathExpansion(t *testing.T) {
deployZarfInit(t)
e2e.CreateZarfPkg(t, "src/test/packages/podinfo", false)

tarballPath := filepath.Join("build", fmt.Sprintf("uds-bundle-ghcr-test-%s-0.0.1.tar.zst", e2e.Arch))

bundleName := "ghcr-test:0.0.1"
inspectRemote(t, bundleName)
pull(t, bundleName, tarballPath)
deploy(t, bundleName)
remove(t, bundleName)

bundleName = fmt.Sprintf("ghcr-delivery-test:0.0.1")
bundleName = fmt.Sprintf("ghcr-delivery-test:0.0.1-%s", e2e.Arch)
inspectRemote(t, bundleName)
pull(t, bundleName, tarballPath)
deploy(t, bundleName)
remove(t, bundleName)

bundleName = fmt.Sprintf("delivery/ghcr-test:0.0.1")
bundleName = fmt.Sprintf("delivery/ghcr-test:0.0.1-%s", e2e.Arch)
inspectRemote(t, bundleName)
pull(t, bundleName, tarballPath)
deploy(t, bundleName)
remove(t, bundleName)

bundleName = "ghcr.io/defenseunicorns/packages/delivery/ghcr-delivery-test:0.0.1"
inspectRemote(t, bundleName)
pull(t, bundleName, tarballPath)
deploy(t, bundleName)
remove(t, bundleName)
}
15 changes: 8 additions & 7 deletions src/test/packages/podinfo/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ metadata:
version: 0.0.1

components:
- name: podinfo-kustomize
- name: podinfo
required: true
manifests:
- name: simple-podinfo-deployment
charts:
- name: podinfo
version: 6.4.0
namespace: podinfo
kustomizations:
- github.com/stefanprodan/podinfo//kustomize?ref=6.4.0
url: https://github.com/stefanprodan/podinfo.git
gitPath: charts/podinfo
images:
- ghcr.io/stefanprodan/podinfo:6.4.0
actions:
onDeploy:
after:
Expand All @@ -20,5 +23,3 @@ components:
name: podinfo
namespace: podinfo
condition: available
images:
- ghcr.io/stefanprodan/podinfo:6.4.0

0 comments on commit 613187e

Please sign in to comment.