Skip to content
This repository has been archived by the owner on Jun 13, 2021. It is now read-only.

Add a json output as default for app inspect #660

Merged
merged 2 commits into from Oct 7, 2019

Conversation

rumpl
Copy link
Member

@rumpl rumpl commented Oct 3, 2019

- What I did

Made docker app inspect print a json by default, added a flag --pretty to print the old tabular inspect.

- How I did it

- How to verify it

  • bundle an app : docker app bundle ... --tag my-app:1.0.0
  • inspect the app: docker app inspect my-app:1.0.0

- Description for the changelog
Docker app inspect now prints a json by default. Only bundled or running apps can be inspected.

- A picture of a cute animal (not mandatory but encouraged)
image

@codecov
Copy link

codecov bot commented Oct 3, 2019

Codecov Report

Merging #660 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #660   +/-   ##
=======================================
  Coverage   71.89%   71.89%           
=======================================
  Files          52       52           
  Lines        2715     2715           
=======================================
  Hits         1952     1952           
  Misses        518      518           
  Partials      245      245

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 84e35ad...bd3038c. Read the comment docs.

e2e/commands_test.go Outdated Show resolved Hide resolved
"github.com/spf13/cobra"
)

type inspectOptions struct {
parametersOptions
pullOptions
pretty bool
}

func inspectCmd(dockerCli command.Cli) *cobra.Command {
var opts inspectOptions
cmd := &cobra.Command{
Use: "inspect [APP_NAME] [OPTIONS]",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chris-crone What should we put here: [APP_NAME]? [APP_IMAGE]? [APP_INSTALLATION]? Both as inspect can be applied on installation or app image?

internal/names.go Outdated Show resolved Hide resolved
@rumpl rumpl force-pushed the feat-inspect branch 3 times, most recently from d8c9ffb to 98ccaaa Compare October 4, 2019 08:49
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
internal/names.go Outdated Show resolved Hide resolved
Older bundles don't have the inspect format parameter, we don't set it
for them, we set it only on bundles that define that parameter.

Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@silvin-lubecki silvin-lubecki merged commit c6102cc into docker:master Oct 7, 2019
@rumpl rumpl deleted the feat-inspect branch October 18, 2019 08:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants