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

Debug should report CNB_APP_DIR as working directory for buildpacks images #4326

Merged
merged 5 commits into from
Jun 16, 2020

Conversation

briandealwis
Copy link
Member

Description

The Cloud Native Buildpacks launcher does a chdir to the directory in the CNB_APP_DIR environment variable (defaulting to /workspace) as the working directory.

This change causes the debug transforms to use and report CNB_APP_DIR as the image working directory in the Container Debug Configuration value that is serialized out in the pod annotation, and which is used to report on debug container events.

(It's surprisingly difficult to set the CNB_APP_DIR — you can't just set it by defining CNB_APP_DIR=xxx during the build!)

@codecov
Copy link

codecov bot commented Jun 15, 2020

Codecov Report

Merging #4326 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #4326      +/-   ##
==========================================
+ Coverage   71.76%   71.77%   +0.01%     
==========================================
  Files         324      324              
  Lines       12477    12482       +5     
==========================================
+ Hits         8954     8959       +5     
  Misses       2954     2954              
  Partials      569      569              
Impacted Files Coverage Δ
pkg/skaffold/debug/cnb.go 92.30% <100.00%> (+0.64%) ⬆️
pkg/skaffold/debug/transform.go 88.77% <100.00%> (+0.06%) ⬆️

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 b0c0629...46f9de3. Read the comment docs.

@briandealwis briandealwis merged commit e0f949b into GoogleContainerTools:master Jun 16, 2020
@briandealwis briandealwis deleted the cnb-workdir branch June 16, 2020 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants