-
Notifications
You must be signed in to change notification settings - Fork 331
Add support for arbitrary writable volume mounts during pack build
#778
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
32b39f3
Implement read/write volume mounting
jromero 839892f
Merge remote-tracking branch 'origin/main' into feature/764-read-writ…
jromero 29bfefc
Add warnings for certain volume mounts
jromero 0f7a440
Update help message for volumes
jromero e691e5d
Skip posix on windows
jromero 32380c2
Fix windows acceptance test
jromero ca15975
Fix tests for linux (permissions)
jromero 69459af
Update warning casing
jromero 4666964
Merge branch 'main' into feature/764-read-write-volumes
jromero 1e6df33
Guard incompatible tests
jromero 595f76a
Update acceptance/acceptance_test.go
jromero 4e5263f
Merge branch 'main' into feature/764-read-write-volumes
jromero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
acceptance/testdata/mock_buildpacks/0.2/read-volume-buildpack/bin/build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| TEST_FILE_PATH=${TEST_FILE_PATH:?"env var must be set"} | ||
|
|
||
| echo "---> Build: Volume Buildpack" | ||
|
|
||
| set -o errexit | ||
| set -o nounset | ||
| set -o pipefail | ||
|
|
||
| echo "Build: Reading file '${TEST_FILE_PATH}': $(< "${TEST_FILE_PATH}")" | ||
|
|
||
| echo "---> Done" |
13 changes: 13 additions & 0 deletions
13
acceptance/testdata/mock_buildpacks/0.2/read-volume-buildpack/bin/detect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| TEST_FILE_PATH=${TEST_FILE_PATH:?"env var must be set"} | ||
|
|
||
| echo "---> Detect: Volume Buildpack" | ||
|
|
||
| set -o errexit | ||
| set -o nounset | ||
| set -o pipefail | ||
|
|
||
| echo "Detect: Reading file '${TEST_FILE_PATH}': $(< "${TEST_FILE_PATH}")" | ||
|
|
||
| echo "---> Done" |
File renamed without changes.
14 changes: 14 additions & 0 deletions
14
acceptance/testdata/mock_buildpacks/0.2/read-write-volume-buildpack/bin/build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| TEST_FILE_PATH=${BUILD_TEST_FILE_PATH:?"env var must be set"} | ||
|
|
||
| echo "---> Build: Read/Write Volume Buildpack" | ||
|
|
||
| set -o errexit | ||
| set -o nounset | ||
| set -o pipefail | ||
|
|
||
| echo "Build: Writing file '${TEST_FILE_PATH}': $(echo "some-content" > "${TEST_FILE_PATH}" && echo "written" || echo "failed")" | ||
| echo "Build: Reading file '${TEST_FILE_PATH}': $(< "${TEST_FILE_PATH}")" | ||
|
|
||
| echo "---> Done" |
14 changes: 14 additions & 0 deletions
14
acceptance/testdata/mock_buildpacks/0.2/read-write-volume-buildpack/bin/detect
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| TEST_FILE_PATH=${DETECT_TEST_FILE_PATH:?"env var must be set"} | ||
|
|
||
| echo "---> Detect: Read/Write Volume Buildpack" | ||
|
|
||
| set -o errexit | ||
| set -o nounset | ||
| set -o pipefail | ||
|
|
||
| echo "Detect: Writing file '${TEST_FILE_PATH}': $(echo "some-content" > "${TEST_FILE_PATH}" && echo "written" || echo "failed")" | ||
| echo "Detect: Reading file '${TEST_FILE_PATH}': $(< "${TEST_FILE_PATH}")" | ||
|
|
||
| echo "---> Done" |
9 changes: 9 additions & 0 deletions
9
acceptance/testdata/mock_buildpacks/0.2/read-write-volume-buildpack/buildpack.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| api = "0.2" | ||
|
|
||
| [buildpack] | ||
| id = "rw-volume/bp" | ||
| version = "rw-volume-bp-version" | ||
| name = "Read/Write Volume Buildpack" | ||
|
|
||
| [[stacks]] | ||
| id = "pack.test.stack" |
11 changes: 0 additions & 11 deletions
11
acceptance/testdata/mock_buildpacks/0.2/volume-buildpack/bin/build
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
acceptance/testdata/mock_buildpacks/0.2/volume-buildpack/bin/detect
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
👍