Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit dc83704

Browse files
committed
Update cnab-to-oci to v0.3.0-beta1 and cnab schema version to 1.0.0
Allow to push all images from the push/fixup command Signed-off-by: Yves Brissaud <yves.brissaud@docker.com>
1 parent a850314 commit dc83704

23 files changed

Lines changed: 490 additions & 258 deletions

File tree

Gopkg.lock

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gopkg.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ required = ["github.com/wadey/gocovmerge"]
4242

4343
[[override]]
4444
name = "github.com/docker/cnab-to-oci"
45-
version = "v0.1.0-beta2"
45+
version = "v0.3.0-beta1"
4646

4747
[[override]]
4848
name = "github.com/containerd/containerd"

e2e/testdata/cnab-parameters/bundle.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"schemaVersion": "v1.0.0-WD",
2+
"schemaVersion": "v1.0.0",
33
"name": "cnab-parameters",
44
"version": "0.1.0",
55
"invocationImages": [

e2e/testdata/cnab-with-docker-status/bundle.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"schemaVersion": "v1.0.0-WD",
2+
"schemaVersion": "v1.0.0",
33
"name": "cnab-with-docker-status",
44
"version": "0.1.0",
55
"invocationImages": [

e2e/testdata/cnab-with-standard-status/bundle.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"schemaVersion": "v1.0.0-WD",
2+
"schemaVersion": "v1.0.0",
33
"name": "cnab-with-standard-status",
44
"version": "0.1.0",
55
"invocationImages": [

e2e/testdata/cnab-without-status/bundle.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"schemaVersion": "v1.0.0-WD",
2+
"schemaVersion": "v1.0.0",
33
"name": "cnab-without-status",
44
"version": "0.1.0",
55
"invocationImages": [

e2e/testdata/credential-install-bundle.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "example-credentials",
33
"version": "0.0.1",
4-
"schemaVersion": "v1.0.0-WD",
4+
"schemaVersion": "v1.0.0",
55
"invocationImages": [
66
{
77
"imageType": "docker",

examples/cnab-helm/bundle.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "hellohelm",
33
"version": "0.1.0",
4-
"schemaVersion": "v1.0.0-WD",
4+
"schemaVersion": "v1.0.0",
55
"invocationImages": [
66
{
77
"imageType": "docker",

internal/cnab/cnab.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,8 @@ func PullBundle(dockerCli command.Cli, bundleStore appstore.BundleStore, tagRef
128128
if err != nil {
129129
return nil, fmt.Errorf("could not retrieve insecure registries: %v", err)
130130
}
131-
bndl, err := remotes.Pull(log.WithLogContext(context.Background()), reference.TagNameOnly(tagRef), remotes.CreateResolver(dockerCli.ConfigFile(), insecureRegistries...))
131+
132+
bndl, _, err := remotes.Pull(log.WithLogContext(context.Background()), reference.TagNameOnly(tagRef), remotes.CreateResolver(dockerCli.ConfigFile(), insecureRegistries...))
132133
if err != nil {
133134
return nil, err
134135
}

internal/commands/push.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,13 @@ func pushBundle(dockerCli command.Cli, opts pushOptions, bndl *bundle.Bundle, re
153153
fixupOptions = append(fixupOptions, remotes.WithComponentImagePlatforms(platforms))
154154
}
155155
// bundle fixup
156-
if err := remotes.FixupBundle(context.Background(), bndl, retag.cnabRef, resolver, fixupOptions...); err != nil {
156+
relocationMap, err := remotes.FixupBundle(context.Background(), bndl, retag.cnabRef, resolver, fixupOptions...)
157+
if err != nil {
157158
return errors.Wrapf(err, "fixing up %q for push", retag.cnabRef)
158159
}
159160
// push bundle manifest
160161
logrus.Debugf("Pushing the bundle %q", retag.cnabRef)
161-
descriptor, err := remotes.Push(log.WithLogContext(context.Background()), bndl, retag.cnabRef, resolver, true, withAppAnnotations)
162+
descriptor, err := remotes.Push(log.WithLogContext(context.Background()), bndl, relocationMap, retag.cnabRef, resolver, true, withAppAnnotations)
162163
if err != nil {
163164
return errors.Wrapf(err, "pushing to %q", retag.cnabRef)
164165
}

0 commit comments

Comments
 (0)