-
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
Allow --no-cache to be passed to docker #2054
Conversation
Added NoCache to docker struct
Allow passing in of --no-cache flag
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 (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
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 start.
Thank you.
Can you add tests for the same here pkg/skaffold/docker/image_test.go#L178
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.
Left a few comments, thanks for contributing!
pkg/skaffold/schema/latest/config.go
Outdated
@@ -631,6 +631,9 @@ type DockerArtifact struct { | |||
// CacheFrom lists the Docker images used as cache sources. | |||
// For example: `["golang:1.10.1-alpine3.7", "alpine:3.7"]`. | |||
CacheFrom []string `yaml:"cacheFrom,omitempty"` | |||
|
|||
// pass in --no-cache to docker build to prevent caching |
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 think this comment needs to be in the form
NoCache blah blah blah.
otherwise the tests will complain 😅
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.
Completed
add no-cache test
Make bool and improve doc string
Change for bool
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.
one more comment!
changed test for no-cache to be bool value
Fixed documentation
Looks like 2 of the tests are failing.
Please run |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
The last commit was actually me but didn't have my username and email configured in git. Is there a way to fix the CLA issue easily? Sorry for all of the issues. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Learned way too much about git today lol. Removed the commit with bad author. |
remove extra space
Codecov Report
@@ Coverage Diff @@
## master #2054 +/- ##
==========================================
+ Coverage 56.04% 56.06% +0.01%
==========================================
Files 179 179
Lines 7742 7745 +3
==========================================
+ Hits 4339 4342 +3
Misses 2987 2987
Partials 416 416
Continue to review full report at Codecov.
|
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, thanks for the contribution!
Thanks for the opportunity and all the help. Learned a lot! |
Hi, sorry but I have a question related to this topic, Does this option set the env var DOCKER_BUILDKIT=1 when docker build is executed? Or is there another way to do with skaffold.yaml? thanks! |
@amendoza-navent in your skaffold.yaml: build:
local:
useBuildKit: true |
As reference in: #2053
This is my first pull request so please carefully review. Happy to make fixes if I did something wrong.