-
Notifications
You must be signed in to change notification settings - Fork 294
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
Update project.toml includes and excludes to respect repository root #1043
Conversation
Signed-off-by: dwillist <dthornton@vmware.com>
Codecov Report
@@ Coverage Diff @@
## release/0.17.0-rc1 #1043 +/- ##
======================================================
- Coverage 80.23% 80.21% -0.01%
======================================================
Files 130 130
Lines 7990 7998 +8
======================================================
+ Hits 6410 6415 +5
- Misses 1160 1163 +3
Partials 420 420
Flags with carried forward coverage won't be shown. Click here to find out more. |
Signed-off-by: dwillist <dthornton@vmware.com>
ed52344
to
0ae4b1d
Compare
Signed-off-by: dwillist <dthornton@vmware.com>
0ae4b1d
to
02cfdd4
Compare
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.
UA:
Using this repo: https://github.com/bervol/buildpack-nodejs-poc, with this project.toml
:
[build]
include = [
"/src",
"/package.json",
"/package-lock.json",
"/nest-cli.json",
"/tsconfig.*json",
]
Before with old project.toml (and after having run npm install
$ pack build test-old-project-toml
base: Pulling from paketobuildpacks/builder
Digest: sha256:16adfeaabc798a524003c0af313471c094c430c7236006b89d1d53c08dcf5c26
Status: Image is up to date for paketobuildpacks/builder:base
base-cnb: Pulling from paketobuildpacks/run
Digest: sha256:1f7e8b4faa102c3c58474632b5366965c3a5765bb156e1ac77b16eb49bcc1086
Status: Image is up to date for paketobuildpacks/run:base-cnb
===> DETECTING
3 of 4 buildpacks participating
paketo-buildpacks/node-engine 0.1.5
paketo-buildpacks/npm-install 0.2.4
paketo-buildpacks/npm-start 0.0.3
===> ANALYZING
Previous image with name "test-old-project-toml" not found
===> RESTORING
===> BUILDING
Paketo Node Engine Buildpack 0.1.5
Resolving Node Engine version
Candidate version sources (in priority order):
-> ""
<unknown> -> "*"
Selected Node Engine version (using ): 14.15.4
Executing build process
Installing Node Engine 14.15.4
Completed in 7.271s
Configuring environment
NODE_ENV -> "production"
NODE_HOME -> "/layers/paketo-buildpacks_node-engine/node"
NODE_VERBOSE -> "false"
Writing profile.d/0_memory_available.sh
Calculates available memory based on container limits at launch time.
Made available in the MEMORY_AVAILABLE environment variable.
Paketo NPM Install Buildpack 0.2.4
Resolving installation process
Process inputs:
node_modules -> "Found"
npm-cache -> "Not found"
package-lock.json -> "Found"
Selected NPM build process: 'npm rebuild'
Executing build process
unlinkat /workspace/node_modules/acorn-globals/package.json: permission denied
ERROR: failed to build: exit status 1
ERROR: failed to build: executing lifecycle: failed with status code: 145
Before w/ updated project.toml
$ pack build test -p /tmp/bp-nodejs-poc/
...
Status: Downloaded newer image for paketobuildpacks/run:base-cnb
===> DETECTING
ERROR: No buildpack groups passed detection.
ERROR: Please check that you are running against the correct path.
ERROR: failed to detect: no buildpacks participating
ERROR: failed to build: executing lifecycle: failed with status code: 100
After:
$ out/pack build test -p /tmp/bp-nodejs-poc/
base: Pulling from paketobuildpacks/builder
Digest: sha256:16adfeaabc798a524003c0af313471c094c430c7236006b89d1d53c08dcf5c26
Status: Image is up to date for paketobuildpacks/builder:base
base-cnb: Pulling from paketobuildpacks/run
Digest: sha256:1f7e8b4faa102c3c58474632b5366965c3a5765bb156e1ac77b16eb49bcc1086
Status: Image is up to date for paketobuildpacks/run:base-cnb
===> DETECTING
3 of 4 buildpacks participating
paketo-buildpacks/node-engine 0.1.5
paketo-buildpacks/npm-install 0.2.4
paketo-buildpacks/npm-start 0.0.3
===> ANALYZING
Restoring metadata for "paketo-buildpacks/node-engine:node" from app image
Restoring metadata for "paketo-buildpacks/npm-install:modules" from app image
Restoring metadata for "paketo-buildpacks/npm-install:npm-cache" from app image
===> RESTORING
Removing "paketo-buildpacks/node-engine:node", not in cache
Removing "paketo-buildpacks/npm-install:modules", not in cache
Removing "paketo-buildpacks/npm-install:npm-cache", not in cache
===> BUILDING
Paketo Node Engine Buildpack 0.1.5
Resolving Node Engine version
Candidate version sources (in priority order):
-> ""
<unknown> -> "*"
Selected Node Engine version (using ): 14.15.4
Executing build process
Installing Node Engine 14.15.4
Completed in 8.006s
Configuring environment
NODE_ENV -> "production"
NODE_HOME -> "/layers/paketo-buildpacks_node-engine/node"
NODE_VERBOSE -> "false"
Writing profile.d/0_memory_available.sh
Calculates available memory based on container limits at launch time.
Made available in the MEMORY_AVAILABLE environment variable.
Paketo NPM Install Buildpack 0.2.4
Resolving installation process
Process inputs:
node_modules -> "Not found"
npm-cache -> "Not found"
package-lock.json -> "Found"
Selected NPM build process: 'npm ci'
Executing build process
Running 'npm ci --unsafe-perm --cache /layers/paketo-buildpacks_npm-install/npm-cache'
Completed in 9.169s
Configuring environment
NPM_CONFIG_LOGLEVEL -> "error"
NPM_CONFIG_PRODUCTION -> "true"
PATH -> "$PATH:/layers/paketo-buildpacks_npm-install/modules/node_modules/.bin"
Paketo NPM Start Buildpack 0.0.3
Assigning launch processes
web: nest start
===> EXPORTING
Reusing layer 'paketo-buildpacks/node-engine:node'
Reusing layer 'paketo-buildpacks/npm-install:modules'
Adding layer 'paketo-buildpacks/npm-install:npm-cache'
Reusing 1/1 app layer(s)
Reusing layer 'launcher'
Reusing layer 'config'
Reusing layer 'process-types'
Adding label 'io.buildpacks.lifecycle.metadata'
Adding label 'io.buildpacks.build.metadata'
Adding label 'io.buildpacks.project.metadata'
Setting default process type 'web'
*** Images (aa3f9bfd7c7c):
test
Adding cache layer 'paketo-buildpacks/node-engine:node'
Adding cache layer 'paketo-buildpacks/npm-install:modules'
Adding cache layer 'paketo-buildpacks/npm-install:npm-cache'
Successfully built image test
Signed-off-by: dwillist <dthornton@vmware.com>
Signed-off-by: dwillist dthornton@vmware.com
Summary
Fixes issue where files were filtered against the
include
andexclude
sections inproject.toml
as absolute paths.Given the following application:
and the following contents of
project.toml
(which uses.gitignore
syntax)/package.json
would be interpreted as a file at the root of your filesystem.Before
After
Documentation
Related
Resolves #987