Skip to content

Commit 2345fd9

Browse files
authored
Use Docker volume to test release artifacts integration with the web process (#5)
* Use Docker volume to test release artifacts integration with the web process * Fix integration test with tempdir storage
1 parent 10f6bcb commit 2345fd9

File tree

10 files changed

+159
-61
lines changed

10 files changed

+159
-61
lines changed

Cargo.lock

Lines changed: 50 additions & 54 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

buildpacks/release-phase/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition.workspace = true
77
workspace = true
88

99
[dependencies]
10-
libcnb = "0.22.0"
10+
libcnb = { git = "https://github.com/mars/libcnb.rs.git", branch = "docker-volume" }
1111
commons_ruby = { git = "https://github.com/heroku/buildpacks-ruby", branch = "main", package = "commons" }
1212
libherokubuildpack = { version = "=0.22.0", default-features = false, features = ["fs", "log"] }
1313
indoc = "2"
@@ -17,5 +17,7 @@ tokio = { version = "1.40.0", features = ["macros", "rt-multi-thread"] }
1717
toml = { version = "0.8", features = ["preserve_order"] }
1818

1919
[dev-dependencies]
20-
libcnb-test = "=0.22.0"
20+
libcnb-test = { git = "https://github.com/mars/libcnb.rs.git", branch = "docker-volume" }
21+
tempfile = "3"
2122
test_support.workspace = true
23+
uuid = { version = "1.10.0", features = ["v4", "serde"] }

buildpacks/release-phase/src/main.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ use setup_release_phase::setup_release_phase;
1717
#[cfg(test)]
1818
use libcnb_test as _;
1919
#[cfg(test)]
20+
use tempfile as _;
21+
#[cfg(test)]
2022
use test_support as _;
23+
#[cfg(test)]
24+
use uuid as _;
2125

2226
// Silence unused dependency warning for
2327
// dependencies used in bin/ executables
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: /bin/bash -c "echo \"STATIC_ARTIFACTS_LOADED_FROM_KEY=$STATIC_ARTIFACTS_LOADED_FROM_KEY\" && cat static-artifacts/note.txt"
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[_]
2+
schema-version = "0.2"
3+
4+
[[io.buildpacks.group]]
5+
uri = "heroku/release-phase"
6+
7+
[com.heroku.phase.release-build]
8+
command = "bash"
9+
args = ["-c", "echo 'Build in Release Phase Buildpack!'; mkdir -p /workspace/static-artifacts; echo 'Hello static world!' > /workspace/static-artifacts/note.txt"]

0 commit comments

Comments
 (0)