-
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
Add option to skaffold run similar to "skaffold build -b" #4734
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Codecov Report
@@ Coverage Diff @@
## master #4734 +/- ##
==========================================
+ Coverage 71.82% 71.91% +0.08%
==========================================
Files 347 347
Lines 11869 11892 +23
==========================================
+ Hits 8525 8552 +27
+ Misses 2725 2718 -7
- Partials 619 622 +3
Continue to review full report at Codecov.
|
@googlebot I signed it! |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
cmd/skaffold/app/cmd/run.go
Outdated
@@ -36,13 +37,16 @@ func NewCmdRun() *cobra.Command { | |||
WithExample("Build, test, deploy and tail the logs", "run --tail"). | |||
WithExample("Run with a given profile", "run -p <profile>"). | |||
WithCommonFlags(). | |||
WithFlags(func(f *pflag.FlagSet) { | |||
f.StringSliceVarP(&opts.TargetImages, "build-image", "b", nil, "Choose which artifacts to build. Artifacts with image names that contain the expression will be built only. Default is to build sources for all artifacts") |
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.
f.StringSliceVarP(&opts.TargetImages, "build-image", "b", nil, "Choose which artifacts to build. Artifacts with image names that contain the expression will be built only. Default is to build sources for all artifacts") | |
f.StringSliceVarP(&opts.TargetImages, "build-image", "b", nil, "Only build artifacts with image names that contain the given substring. Default is to build sources for all artifacts") |
nit: I know that you took the same text as the existing build-image
flag on build
. But the grammar seems off.
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.
If the flag is the same elsewhere then we should instead add it to the flagRegistry
.
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.
LGTM
cmd/skaffold/app/cmd/run_test.go
Outdated
{ | ||
ImageName: "first", | ||
}, | ||
{ | ||
ImageName: "second-test", | ||
}, | ||
{ | ||
ImageName: "test", | ||
}, | ||
{ | ||
ImageName: "aaabbbccc", | ||
}, |
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.
These take up a lot of space!
{ | |
ImageName: "first", | |
}, | |
{ | |
ImageName: "second-test", | |
}, | |
{ | |
ImageName: "test", | |
}, | |
{ | |
ImageName: "aaabbbccc", | |
}, | |
{ImageName: "first"}, | |
{ImageName: "second-test"}, | |
{ImageName: "test"}, | |
{ImageName: "aaabbbccc"}, |
@anshlykov thanks for making all the suggested changes. Can you sync with the master branch; then we can merge this and call it done 👍 |
Travis bug is showing duplicate checks and stuck on one of them. This PR's actually cleared all checks. Merging. |
@gsquared94 thanks for resolving the merge conflict |
Fixes: #4494
Description
Added the artifact filter for the
run
command, similar to thebuild
command.