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
Add buildpack pull command #935
Conversation
The pull-buildpack command accepts a buildpack URI as an argument, in the for of a URL, CNB URN, docker tag, or buildpack ID and version in a registry. It then pulls the buildpackage, extracts it into a buildpack image if necessary, and stores it in the local daemon. Signed-off-by: Joe Kutner <jpkutner@gmail.com>
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.
This is a great idea!
It looks like there are a few issues in the implementation but should be easy enough to address. Looking forward to the update.
) | ||
|
||
type PullBuildpackOptions struct { | ||
URI string |
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.
I was confused by this in the beginning, until I realized I didn't know enough about the formal definition of a URI
(which it should definitely fit):
A URI is an identifier of a specific resource. Like a page, or book, or a document. A URL is special type of identifier that also tells you how to access it, such as HTTPs, FTP, etc.—like https://www.google.com.
https://danielmiessler.com/study/difference-between-uri-url/
…stries Signed-off-by: Joe Kutner <jpkutner@gmail.com>
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.
Overall, looks great. Just a small comment on adding some of the information from the PR to the command, to make it a bit clearer for users.
Use: "pull-buildpack <uri>", | ||
Args: cobra.ExactArgs(1), | ||
Short: prependExperimental("Pull the buildpack and store it locally"), | ||
Example: "pack pull-buildpack example/my-buildpack@1.0.0", |
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.
nit: Could you add a Long:
description clarifying why people would use it, and what valid inputs look like?
Codecov Report
@@ Coverage Diff @@
## main #935 +/- ##
==========================================
- Coverage 77.68% 77.63% -0.04%
==========================================
Files 103 105 +2
Lines 5017 5060 +43
==========================================
+ Hits 3897 3928 +31
- Misses 725 731 +6
- Partials 395 401 +6
Flags with carried forward coverage won't be shown. Click here to find out more. |
I'm going to rework this command as part of #962 to make it |
Summary
The
pull-buildpack
command accepts a buildpack URI as an argument, in the form of a URL, CNB URN, docker tag, or buildpack ID and version in a registry. It then pulls the buildpackage, extracts it into a buildpack image if necessary, and stores it in the local daemon.This command is useful for users who may need to run the
build
orcreate-builder
command with--pull-policy never
. They can run thepull-buildpack
at an earlier time to load the buildpackage image into the local daemon.Output
Documentation