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

Get tmp Directory from os env in kaniko local context storing #1285

Conversation

venkatk-25
Copy link
Contributor

Skaffold build fails in windows environment, since there is no /tmp directory

@googlebot
Copy link

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.
In order to pass this check, please resolve this problem and have the pull request author add another comment and the bot will run again. If the bot doesn't comment, it means it doesn't think anything has changed.

@codecov-io
Copy link

codecov-io commented Nov 16, 2018

Codecov Report

Merging #1285 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1285   +/-   ##
=======================================
  Coverage   44.24%   44.24%           
=======================================
  Files         104      104           
  Lines        4629     4629           
=======================================
  Hits         2048     2048           
  Misses       2372     2372           
  Partials      209      209

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e3d808c...9789cde. Read the comment docs.

@venkatk-25 venkatk-25 force-pushed the fix_kaniko_local_for_windows branch from 241d1ed to 0dd6e37 Compare November 16, 2018 12:34
@venkatk-25 venkatk-25 force-pushed the fix_kaniko_local_for_windows branch from 0dd6e37 to 8cb889a Compare November 19, 2018 06:07
@venkatk-25 venkatk-25 force-pushed the fix_kaniko_local_for_windows branch from 8cb889a to 9789cde Compare November 19, 2018 11:04
@googlebot
Copy link

CLAs look good, thanks!

@@ -105,12 +105,13 @@ func (g *LocalDir) ModifyPod(ctx context.Context, p *v1.Pod) error {
return errors.Wrap(err, "waiting for pod to initialize")
}
// Copy over the buildcontext tarball into the init container
copy := exec.CommandContext(ctx, "kubectl", "cp", g.tarPath, fmt.Sprintf("%s:/%s", p.Name, g.tarPath), "-c", initContainer, "-n", p.Namespace)
tarCopyPath := fmt.Sprintf("/tmp/%s", filepath.Base(g.tarPath))
copy := exec.CommandContext(ctx, "kubectl", "cp", g.tarPath, fmt.Sprintf("%s:%s", p.Name, tarCopyPath), "-c", initContainer, "-n", p.Namespace)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need the tarCopyPath variable, since copying to g.tarPath should accomplish the same thing, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@priyawadhwa It doesn't work in windows unfortunately. That is the reason I had to use tarCopyPath .

g.tarPath = os.TempDir() in windows ~ C:\Users<user-id>\AppData\Local\Temp

Copy link
Contributor

Choose a reason for hiding this comment

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

ah gotcha, sounds good!

@priyawadhwa priyawadhwa added the kokoro:run runs the kokoro jobs on a PR label Nov 20, 2018
@kokoro-team kokoro-team removed the kokoro:run runs the kokoro jobs on a PR label Nov 20, 2018
@priyawadhwa priyawadhwa merged commit 9239cc4 into GoogleContainerTools:master Nov 20, 2018
@priyawadhwa
Copy link
Contributor

Thanks for fixing this!

@venkatk-25 venkatk-25 deleted the fix_kaniko_local_for_windows branch April 4, 2019 13:19
@venkatk-25 venkatk-25 restored the fix_kaniko_local_for_windows branch April 4, 2019 13:19
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.

6 participants