-
Notifications
You must be signed in to change notification settings - Fork 177
Push local docker images and use relocation map #719
Conversation
1640015
to
2b2b8df
Compare
Please sign your commits following these rules: $ git clone -b "relocation-push" [email protected]:eunomie/app.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842354601344
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f Amending updates the existing PR. You DO NOT need to open a new one. |
Codecov Report
@@ Coverage Diff @@
## master #719 +/- ##
==========================================
- Coverage 70.9% 70.48% -0.43%
==========================================
Files 61 62 +1
Lines 3221 3208 -13
==========================================
- Hits 2284 2261 -23
- Misses 625 641 +16
+ Partials 312 306 -6
Continue to review full report at Codecov.
|
65b342b
to
db73c8b
Compare
43cf827
to
c0aa853
Compare
c0aa853
to
7e47106
Compare
note: |
7e47106
to
c8a1afb
Compare
ea52b57
to
c877797
Compare
I think the separation between the store and the bundle is a good thing. But not fully done so the result is weird here. But I think it's something we can fix/improve in an other PR, as it also requires changes in cnab-go. |
160797a
to
939ec36
Compare
This line is no more, it's again a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
internal/commands/push.go
Outdated
RunE: func(cmd *cobra.Command, args []string) error { | ||
return runPush(dockerCli, firstOrEmpty(args), opts) | ||
return runPush(dockerCli, firstOrEmpty(args)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't be empty, so args[0]
939ec36
to
68a41ca
Compare
internal/relocated/bundle.go
Outdated
return nil, errors.Wrapf(err, "failed to read bundle") | ||
} | ||
|
||
relocationMapFileName := filepath.Join(filepath.Dir(filename), "relocation-map.json") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"relocation-map.json" should be a const
Allow to push all images from the push/fixup command Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
Only visible when trying to install it but still an issue Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
By example we do not display the full reference anymore but use relocation map Signed-off-by: Yves Brissaud <[email protected]>
Signed-off-by: Yves Brissaud <[email protected]>
When a relocation map is generated from `cnab-to-oci` save it within the same directory as the `bundle.json` file. More information about reloaction map can be found in corresponding `cnab-to-oci` issue: cnabio/cnab-to-oci#58 The `bundle.Bundle` struct is now wrapped in a `relocated.Bundle` that will also contain the relocation map. Methods to fetch `bundle.json` and `relocation-map.json` as well as en entire bundle with the relocation map at once are moved to a `fetch` package to avoid dependency cycle. Signed-off-by: Yves Brissaud <[email protected]>
68a41ca
to
e9d4be5
Compare
Allow to replace local images by the one from the registry using stored `relocation-map.json` when creating the installation. The `bundle.json` is not modified. Signed-off-by: Yves Brissaud <[email protected]>
Be sure to remove the non needed lines. Signed-off-by: Yves Brissaud <[email protected]>
038e57d
to
0f5dd8a
Compare
- What I did
platform
andtag
flags from thepush
command.cnab-to-oci
(see Store the whole Bundle.json and generate a Relocation map cnabio/cnab-to-oci#58)- How I did it
Integration of the latest
cnab-to-oci
that performs the push.Note for the reviewer: the change is not that big, but contains multiple libraries bump so the diff is really big.
Changes are in different commits to be easier to understand and review. Bump commits contains both bump and immediate changes to be able to compile. But e2e tests are updated in dedicated commits.
One e2e test is still deactivated the time I found why it doesn't work well.
- How to verify it
docker app push
command: should not contain option anymoredockercoins
example)docker app build -t user/repo/dockercoins:push .
docker app push user/repo/dockercoins:push
-invoc
)redis
) must be mounted or copied (like before)docker app build
for id in $(cat bundle.json | jq '.images | to_entries[] | .value.contentDigest | select(. != null)' | sed 's/"//g' | sed 's/sha256\://g'); do docker rmi -f $id; done
docker app pull user/repo/dockercoins:push
docker app run user/repo/dockerocoins:push
- Description for the changelog
push
command now pushes missing images from the local docker daemon image store to the registry. Options about platform and tags has been removed and must be defined in a previous step, like during build.CNAB schema is now in version 1.0.0.