Skip to content
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

Validate buildpack API version #254

Closed
ameyer-pivotal opened this issue Aug 9, 2019 · 1 comment · Fixed by #282
Closed

Validate buildpack API version #254

ameyer-pivotal opened this issue Aug 9, 2019 · 1 comment · Fixed by #282
Assignees
Milestone

Comments

@ameyer-pivotal
Copy link
Contributor

ameyer-pivotal commented Aug 9, 2019

pack create-builder

Buildpack incompatible with lifecycle

Given I have a buildpack.toml for buildpack X with an api string field "0.x"
Given A lifecycle with a descriptor file specifying that the lifecycle has Buildpack API other than 0.x
When I run pack create-builder while targeting the given lifecycle
Then I see an error message:

buildpack X (Buildpack API version 0.x) is incompatible with lifecycle X (Buildpack API version 0.y)

Buildpack compatible with lifecycle

Given I have a buildpack.toml for buildpack X with an api string field "0.x"
When I run pack create-builder while targeting lifecycle with a matching Buildpack API version
Then the command completes successfully

pack build

Buildpack incompatible with builder (lifecycle)

Given I have a buildpack.toml for buildpack X with an api string field "0.x"
Given A builder that specifies a lifecycle with Buildpack API other than "0.x" in it's metadata
When I run pack build while targeting the given builder
Then I see an error message:

buildpack X (Buildpack API version 0.x) is incompatible with builder X (Buildpack API version 0.y)

Buildpack compatible with builder (lifecycle)

Given I have a buildpack.toml for buildpack X with an api string field equal to "0.x"
Given A builder that specifies a lifecycle with Buildpack API "0.x" in it's metadata
When I run pack build while targeting the given builder
Then the command completes successfully

Missing api metadata

Given a buildpack.toml with a missing api field
Then the api shall be assumed to be 0.1

Given a lifecycle with a missing descriptor file
Then the lifecycles Buildpack API shall be assumed to be 0.1

Given a builder with missing lifecycle api metadata
Then the lifecycles Buildpack API shall be assumed to be 0.1

@ameyer-pivotal ameyer-pivotal added this to the 0.4.0 milestone Aug 9, 2019
@jromero jromero self-assigned this Aug 19, 2019
jromero added a commit that referenced this issue Sep 5, 2019
* Default lifecycle during `create-builder` if no version or URI is specified

Resolves #254

Signed-off-by: Javier Romero <[email protected]>
Signed-off-by: Andrew Meyer <[email protected]>
jromero added a commit that referenced this issue Sep 6, 2019
* Default lifecycle during `create-builder` if no version or URI is specified

Resolves #254

Signed-off-by: Javier Romero <[email protected]>
Signed-off-by: Andrew Meyer <[email protected]>
jromero added a commit that referenced this issue Sep 6, 2019
* Default lifecycle during `create-builder` if no version or URI is specified

Resolves #254

Signed-off-by: Javier Romero <[email protected]>
Signed-off-by: Andrew Meyer <[email protected]>
jromero added a commit that referenced this issue Sep 9, 2019
* Default lifecycle during `create-builder` if no version or URI is specified

Resolves #254

Signed-off-by: Javier Romero <[email protected]>
Signed-off-by: Andrew Meyer <[email protected]>
jromero added a commit that referenced this issue Sep 9, 2019
* Default lifecycle during `create-builder` if no version or URI is specified

Resolves #254

Signed-off-by: Javier Romero <[email protected]>
Signed-off-by: Andrew Meyer <[email protected]>
@sclevine
Copy link
Member

Looks good:

ERROR: validating buildpacks: buildpack [email protected] (Buildpack API version 0.1) is incompatible with lifecycle 0.4.0 (Buildpack API version 0.2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants