Skip to content

Commit

Permalink
Deps as docker uris (#36)
Browse files Browse the repository at this point in the history
* Switch external buildpack dependencies to docker:// URIs

* Documentation improvements

* Update to public runners, since this repo is now public

* Fix for updated release-phase log streaming
  • Loading branch information
mars authored Dec 12, 2024
1 parent fa2253b commit a1f7cd2
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
jobs:

rust-lint:
runs-on: sfdc-hk-ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -25,7 +25,7 @@ jobs:
run: cargo fmt -- --check

rust-unit-test:
runs-on: sfdc-hk-ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -37,7 +37,7 @@ jobs:
run: cargo test --locked

rust-integration-test:
runs-on: sfdc-hk-ubuntu-latest
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion buildpacks/website-ember/tests/integration_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fn ember_cli_app() {
let log_output = container.logs_now();
assert_contains!(log_output.stderr, "release-phase plan");
assert_contains!(
log_output.stdout,
log_output.stderr,
format!("save-release-artifacts writing archive: release-{unique}.tgz")
.as_str()
);
Expand Down
22 changes: 17 additions & 5 deletions meta-buildpacks/website-nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,30 @@ pack build <APP_NAME> \

# Execute Release Build
docker run --entrypoint release \
--env STATIC_ARTIFACTS_URL=file://<WEBSITE_DIR>/static-artifacts \
--env STATIC_ARTIFACTS_URL=file:///workspace/artifact-storage \
--volume <LOCAL_DIR>/artifact-storage:/workspace/artifact-storage \
--env RELEASE_ID=v1 \
--volume <WEBSITE_DIR>/static-artifacts:/workspace/static-artifacts \
<APP_NAME>

# Launch Web Server
docker run \
--env STATIC_ARTIFACTS_URL=file://<WEBSITE_DIR>/static-artifacts \
--env RELEASE_ID=v1 \
--env PORT=8888 -p 8888:8888 \
--volume <WEBSITE_DIR>/static-artifacts:/workspace/static-artifacts \
--env STATIC_ARTIFACTS_URL=file:///workspace/artifact-storage \
--volume <LOCAL_DIR>/artifact-storage:/workspace/artifact-storage \
--env RELEASE_ID=v1 \
<APP_NAME>

# Interactively inspect release artifacts
docker run \
--env STATIC_ARTIFACTS_URL=file:///workspace/artifact-storage \
--volume <LOCAL_DIR>/artifact-storage:/workspace/artifact-storage \
--env RELEASE_ID=v1 \
-it --entrypoint bash \
<APP_NAME>
# Run artifact loader
$ /layers/heroku_release-phase/main/exec.d/web/load-release-artifacts
# Inspect artifacts
$ ls -hal static-artifacts
```

## Configuration
Expand Down
2 changes: 1 addition & 1 deletion meta-buildpacks/website-nodejs/buildpack.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ version = "1.0.3"

[[order.group]]
id = "heroku/nodejs"
version = "3.3.1"
version = "3.3.5"

[[order.group]]
id = "heroku/static-web-server"
Expand Down
4 changes: 2 additions & 2 deletions meta-buildpacks/website-nodejs/package.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ uri = "."
uri = "libcnb:heroku/website-ember"

[[dependencies]]
uri = "urn:cnb:registry:heroku/nodejs@3.3.1"
uri = "docker://heroku/buildpack-nodejs:3.3.5"

[[dependencies]]
uri = "libcnb:heroku/static-web-server"

[[dependencies]]
uri = "urn:cnb:registry:heroku/release-phase"
uri = "docker://heroku/buildpack-release-phase:1.0.3"
2 changes: 1 addition & 1 deletion meta-buildpacks/website/package.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ uri = "libcnb:heroku/website-public-html"
uri = "libcnb:heroku/static-web-server"

[[dependencies]]
uri = "urn:cnb:registry:heroku/release-phase"
uri = "docker://heroku/buildpack-release-phase:1.0.3"

0 comments on commit a1f7cd2

Please sign in to comment.