Skip to content

Commit

Permalink
Clarify support for older platform APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
sambhav committed Jul 1, 2021
1 parent f09506e commit 0903d1a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions text/0000-shared-layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ The structure would look like -
└── env
```

Each buildpack will be passed an environment variable `CNB_BP_SHARED_LAYERS_DIR` with the location to the shared layers directory for a buildpack.
Each buildpack will be passed an environment variable `CNB_BP_SHARED_LAYERS_DIR` with the location to the shared layers directory for a buildpack. Additionally all the lifecycle binaries that accept `-layers` would accept a `-shared-layers` with the location for this shared layers directory. Older platform APIs could still utilize this and the lifecycle would default to use `<layers>/@shared` (this should not clash with any valid buildpack ID since `@` is not a valid symbol for buildpack IDs ) sub-directory for shared layers in that case.

The `<shared-layer>.toml` would look like -

Expand All @@ -83,6 +83,7 @@ All layers created in the `shared-layers` directory are build layers by default.

A `shared-layer` is associated with a specific buildpack that created it and it is expected to be wiped if the associated buildpack is not involved during the build process. The `env` directory is co-located with the `shared-layer` so that the associated environment variables that may point to directories in the `shared-layer` follow the same lifecycle as the `shared-layer` itself.


# Drawbacks
[drawbacks]: #drawbacks

Expand All @@ -109,8 +110,6 @@ The plan would be that this `<shared-layers>` directory would be relocated along
# Unresolved Questions
[unresolved-questions]: #unresolved-questions

- How would we accomodate for older platform APIs that may not have a mounted volume for `shared-layers`?


# Spec. Changes (OPTIONAL)

Expand Down

0 comments on commit 0903d1a

Please sign in to comment.