Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add copyCmd() #432

Merged
merged 18 commits into from
Jul 8, 2022
Merged

feat: add copyCmd() #432

merged 18 commits into from
Jul 8, 2022

Conversation

junczhu
Copy link
Contributor

@junczhu junczhu commented Jul 1, 2022

Resolves #307

Signed-off-by: Juncheng Zhu junczhu@microsoft.com

Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
cmd/oras/copy.go Outdated Show resolved Hide resolved
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Copy link
Contributor

@qweeah qweeah left a comment

Choose a reason for hiding this comment

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

@CharingJC Please

  1. Enhance option.Remote so it can be used on both source and destination target for copy command
  2. Add unit test for the added code

Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
cmd/oras/internal/option/remote.go Outdated Show resolved Hide resolved
cmd/oras/copy.go Outdated Show resolved Hide resolved
cmd/oras/copy.go Outdated Show resolved Hide resolved
cmd/oras/copy.go Outdated Show resolved Hide resolved
cmd/oras/copy.go Outdated
src,
srcRef.ReferenceOrDefault(),
dst,
dstRef.ReferenceOrDefault(),
Copy link
Contributor

Choose a reason for hiding this comment

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

@shizhMSFT For the copy src and dest, should we disable auto-filling the latest tag?

Copy link
Contributor

Choose a reason for hiding this comment

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

@CharingJC Please implement according to #439

cmd/oras/copy.go Outdated
srcRef.ReferenceOrDefault(),
dst,
dstRef.ReferenceOrDefault(),
oras.DefaultExtendedCopyOptions,
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to add more detailed status tracking via setting the copy options. Please clarify the format and implement referring to push command

Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
…funcs

Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
…ate func description; feat: update copyCmd help info; feat: put copy & extendCopy func params into one line

Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
cmd/oras/copy.go Outdated
dstRef.ReferenceOrDefault(),
oras.DefaultCopyOptions,
)
desc, err = oras.Copy(ctx, src, srcRef.ReferenceOrDefault(), dst, dstRef.ReferenceOrDefault(), oras.DefaultCopyOptions)

Choose a reason for hiding this comment

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

Not a strong opinion, I'd like to create a struct wrapping up related params instead of passing too many params directly.

Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
@junczhu junczhu changed the title [WIP] feat: add copyCmd() feat: add copyCmd() Jul 7, 2022
@junczhu junczhu marked this pull request as ready for review July 7, 2022 09:05
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Signed-off-by: Juncheng Zhu <junczhu@microsoft.com>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy Artifact Reference Graph
4 participants