-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Expand the skaffold init --artifact API to allow specifying artifact context #5000
Expand the skaffold init --artifact API to allow specifying artifact context #5000
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5000 +/- ##
==========================================
- Coverage 72.16% 72.11% -0.05%
==========================================
Files 363 365 +2
Lines 12762 12776 +14
==========================================
+ Hits 9210 9214 +4
- Misses 2866 2877 +11
+ Partials 686 685 -1
Continue to review full report at Codecov.
|
return nil | ||
} | ||
|
||
func processCliArtifacts(cliArtifacts []string) ([]BuilderImagePair, error) { | ||
func processCliArtifacts(cliArtifacts []string) ([]BuilderImagePair, []string, error) { |
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.
Is there a reason to not include the workspace in the BuilderImagePair
?
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 would prefer to do this too. The current way that I did things make it more bloated. I'll work on this change.
@briandealwis fixed up some things based off your suggestions. PTAL when you get the chance :) |
@@ -51,6 +51,7 @@ type InitBuilder interface { | |||
type BuilderImagePair struct { |
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.
The name is a bit funny. I wonder if it's worth renaming now as something like ProtoArtifact
.
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.
Yeah, was thinking of renaming it to something like ArtifactInfo
or something similar like what you suggested. I'll make a follow up PR to rename it. Didn't want to do it here as there are quite a few instances and didn't want to bloat things more
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.
SGTM
Fixes #3814
Description
This PR allow for users to specify a context when passing artifacts into
skaffold init --artifact
.Previously, users could specify the fields "builder", "payload", and "image", but can now additionally specify "context". Omitting the "context" field will result in skaffold's typical context suggestions.
For example:
would result in the following config