-
Notifications
You must be signed in to change notification settings - Fork 70
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
Enhance build plan and expose env vars during detection #27
Conversation
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.
Just some questions that might lead to some clarifications.
buildpack.md
Outdated
The lifecycle MUST NOT include any changes in this map that are output by optional buildpacks that returned non-zero exit statuses. | ||
The final Build Plan is the complete combined map that includes the output of the final `/bin/detect` executable. | ||
The lifecycle MUST NOT include any changes in this map that are contributed by optional buildpacks that returned non-zero exit statuses. | ||
The final Build Plan is the fully-merged merged map that includes the contributions of the final `/bin/detect` executable. |
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.
Is the definition of "fully-merged" ever defined anywhere? Is it some sort of deep merge, a last-wins shallow merge, or something else?
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.
The last-wins shallow merge behavior is defined with:
The lifecycle MUST construct this map such that the top-level values from later buildpacks override the entire top-level values from earlier buildpacks.
@@ -639,7 +669,6 @@ Buildpacks MUST specify: | |||
```toml | |||
[<dependency name>] | |||
version = "<dependency version>" | |||
provider = "<buildpack ID>" |
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.
👍
buildpack.md
Outdated
@@ -70,19 +70,23 @@ The lifecycle MUST invoke these executables as described in the Phase sections. | |||
|
|||
Executable: `/bin/detect`, Working Dir: `<app[AR]>` |
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.
I think we need to add <platform[AR]>
here.
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.
Actually <platform[A]>
because of the build plan
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.
Good catch! Fixed
@nebhale can you give me an example use case for needing env vars during detect? Because we're talking about a new arg to |
@jkutner In general, we use service bindings to declare intent for our integrations; e.g. existence of a |
Both the build plan changes and exposing the environment variables require adding the The only breaking change is that |
I have a use case for user-provided env vars in |
- Normalize build/detect interfaces - Require Bash 3 for develop Signed-off-by: Stephen Levine <stephen.levine@gmail.com>
aa52424
to
7abe622
Compare
Signed-off-by: Stephen Levine <stephen.levine@gmail.com>
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.
Thanks for working me through this.
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
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.
I'd like <plan>
to move to $2
in build
and develop
for symmetry.
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.
I'd like <plan>
to move to $2
in build
and develop
for symmetry.
buildpack.md
Outdated
@@ -110,7 +115,7 @@ Executable: `/bin/build <platform[AR]> <cache[EC]> <launch[EI]>`, Working Dir: ` | |||
|
|||
### Development | |||
|
|||
Executable: `/bin/develop <platform[A]> <cache[EC]>`, Working Dir: `<app[A]>` | |||
Executable: `/bin/develop <platform[AR]> <cache[EC]>`, Working Dir: `<app[A]>` |
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.
Missing <plan>
Signed-off-by: Stephen Levine <stephen.levine@gmail.com>
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.
Ship it.
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <platform>/plan, and updates Build to allow claims on build plan dependencies via <platform>/plan. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io> [ci skip] Incremental commit. Please do not base any external work off of this commit. Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io> [ci skip] Incremental commit. Please do not base any external work off of this commit. Signed-off-by: Ben Hale <bhale@pivotal.io>
This change updates the library to match upcoming spec changes. It adds the Platform to Detect, updates the Detect logger to use stdout, updates Detect's build plan output to write to <plan>, and updates Build to allow claims on build plan dependencies via <plan>. [buildpacks/spec#27] Signed-off-by: Ben Hale <bhale@pivotal.io> [ci skip] Incremental commit. Please do not base any external work off of this commit. Signed-off-by: Ben Hale <bhale@pivotal.io>
Formalizes #24.