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

[WIP] Add --digests flag to image ls command to show app image digests #677

Closed
wants to merge 1 commit into from

Conversation

jcsirot
Copy link
Contributor

@jcsirot jcsirot commented Oct 8, 2019

- What I did
Add --digests flag to docker app image ls command

- How to verify it
the docker app image ls --digests should output a similar message in the console

$ docker app image ls --digests
REPOSITORY        TAG   DIGEST                                                                  APP NAME
my-app            1.0.1 <none>                                                                  voting-app
rumpl/hello-world 1.0.0 sha256:2d2417f6bdedb3cf701f91565fec682bfb60032b51fa4e955b918e4ac4cc618d hello-world

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

Signed-off-by: Jean-Christophe Sirot <jean-christophe.sirot@docker.com>
@codecov
Copy link

codecov bot commented Oct 8, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@90d8144). Click here to learn what that means.
The diff coverage is 47.05%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #677   +/-   ##
=========================================
  Coverage          ?   70.91%           
=========================================
  Files             ?       56           
  Lines             ?     2912           
  Branches          ?        0           
=========================================
  Hits              ?     2065           
  Misses            ?      582           
  Partials          ?      265
Impacted Files Coverage Δ
internal/commands/image/list.go 64.55% <47.05%> (ø)

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 90d8144...0077e78. Read the comment docs.

return reference.FamiliarName(p.ref)
}},
{"TAG", func(p pkg) string {
t, ok := p.ref.(reference.Tagged)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

if t, ok := p.ref.(reference.Tagged); ok{
    return t.Tag()
}

{"APP IMAGE", func(p pkg) string {
return reference.FamiliarString(p.ref)
}},
{"APP NAME", func(p pkg) string {
return p.bundle.Name
}},
}

withDigestColumns = columns{
{"REPOSITORY", func(p pkg) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we have REPOSITORY and TAG here, and not just APP IMAGE and APP NAME ? 🤔

}
return "<none>"
}},
{"DIGEST", func(p pkg) string {
Copy link
Contributor

Choose a reason for hiding this comment

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

We're missing a test on that part (with a golden file).

@jcsirot
Copy link
Contributor Author

jcsirot commented Nov 4, 2019

superseded by #709

@jcsirot jcsirot closed this Nov 4, 2019
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

3 participants