This repository has been archived by the owner on Jun 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 177
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Allow `image inspect` of CNABs not created with docker app. The command will output basic information that is read from the bundle.json file including: * metadata (version, name, description, maintainers) * services (name and image) * parameters (including default values if present) Signed-off-by: Nick Adcock <nick.adcock@docker.com>
eunomie
approved these changes
Nov 19, 2019
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
Checks the CNAB for the docker app inspect action before attempting to call inspect. If the action is not defined then inspect the CNAB bundle directly. Refactors the `hasAction` func to just check for the key instead of looping through the map. Signed-off-by: Nick Adcock <nick.adcock@docker.com>
Codecov Report
@@ Coverage Diff @@
## master #753 +/- ##
=======================================
Coverage 69.94% 69.94%
=======================================
Files 63 63
Lines 3540 3540
=======================================
Hits 2476 2476
Misses 744 744
Partials 320 320 Continue to review full report at Codecov.
|
zappy-shu
force-pushed
the
APP-321-inspect-cnab-bundles
branch
2 times, most recently
from
November 20, 2019 11:47
af4ed9d
to
be5afd0
Compare
Prints the metadata fields in PascalCase when calling `app image inspect` to match the other fields. Fixed `FromBundle` func comment Signed-off-by: Nick Adcock <nick.adcock@docker.com>
zappy-shu
force-pushed
the
APP-321-inspect-cnab-bundles
branch
from
November 20, 2019 11:53
be5afd0
to
9af8789
Compare
Removes the App-only SERVICE fields from the `app image inspect --pretty` output when inspecting a non-App CNAB: * REPLICAS * PORTS Added unit test for image inspect of CNABs with pretty format. Refactored parameter key sorting code to use simpler `sort.Strings()` Signed-off-by: Nick Adcock <nick.adcock@docker.com>
zappy-shu
force-pushed
the
APP-321-inspect-cnab-bundles
branch
from
November 20, 2019 12:15
9af8789
to
8908b28
Compare
zappy-shu
changed the title
[WIP] Image inspect non-app CNABs
Image inspect non-app CNABs
Nov 20, 2019
eunomie
approved these changes
Nov 20, 2019
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
Tested with the hello example from cnab-to-oci repository and it looks great.
Metadata field names are now ok.
rumpl
approved these changes
Nov 21, 2019
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
- What I did
Allow
image inspect
of CNABs not created with docker app. The command will output basic information that is read from the bundle.json file including:Metadata fields are now printed in PascalCase to match the other fields
- How I did it
The
image inspect
command first checks if the invocation image supports the customcom.docker.app.inspect
command. If yes then this is called with the format as before. If not then it's not a Docker App bundle and the bundle file is parsed for the relevant information which is then printed using the same formatters as the Docker App inspect function.- How to verify it
Manually create a CNAB, push it to hub with cnab-to-oci, and pull it with docker app. Use
docker app image inspect <cnab-id>
and confirm the output contains the metadata, services, and parameters.You can also use
docker app image inspect <cnab-id> --pretty
to get a table view but 2 fields are removed (REPLICAS and PORTS)- Description for the changelog
Allow
docker app image inspect
of CNAB bundles created without Docker App- A picture of a cute animal (not mandatory)