Skip to content

[v8] Add lifecycle flag to buildpacks related commands #3496

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

Open
wants to merge 4 commits into
base: v8
Choose a base branch
from

Conversation

tomkennedy513
Copy link

Description of the Change

This adds the a lifecycle flag to cf buildpacks and cf create-buildpack to support cnb. This makes use of the changes in cloudfoundry/cloud_controller_ng#3898.

Why Is This PR Valuable?

Without this change there is no way to create buildpacks with non default lifecycles

Applicable Issues

List any applicable GitHub Issues here

How Urgent Is The Change?

This change should be merged right after cloudfoundry/cloud_controller_ng#3898 to allow folks to use that feature.

Other Relevant Parties

Who else is affected by the change?

@tomkennedy513 tomkennedy513 force-pushed the lifecycle-flag-v8 branch 3 times, most recently from 3706ee6 to 4cc0e56 Compare April 28, 2025 20:52
@tomkennedy513 tomkennedy513 marked this pull request as ready for review April 28, 2025 20:54
@tomkennedy513 tomkennedy513 changed the title Add lifecycle flag to buildpacks and create-buildpack [v8] Add lifecycle flag to buildpacks and create-buildpack Apr 28, 2025
@tomkennedy513 tomkennedy513 force-pushed the lifecycle-flag-v8 branch 2 times, most recently from 72e5374 to d9b37fc Compare April 28, 2025 22:59
queries := []ccv3.Query{ccv3.Query{Key: ccv3.OrderBy, Values: []string{ccv3.PositionOrder}}}
if labelSelector != "" {
queries = append(queries, ccv3.Query{Key: ccv3.LabelSelectorFilter, Values: []string{labelSelector}})
}

if lifecycle != "" {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question What happens when specifying this flag against an older CAPI without cloudfoundry/cloud_controller_ng#3898 ? Ideally it should fail gracefully. We may need a guard like https://github.com/cloudfoundry/cli/blob/main/command/v7/push_command.go#L583

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left it at the next patch version for now, will adjust if needed when the version is released

@Samze
Copy link
Contributor

Samze commented Apr 29, 2025

Note This PR should not be merged before cloudfoundry/cloud_controller_ng#3898 is merged and in a CAPI release

Signed-off-by: Tom Kennedy <tom.kennedy@broadcom.com>
@a-b a-b force-pushed the lifecycle-flag-v8 branch from 9a4496f to 7edc0d7 Compare April 29, 2025 19:52
- This will allow capi to update the default order independently of the cli in the future

Signed-off-by: Tom Kennedy <tom.kennedy@broadcom.com>
@tomkennedy513 tomkennedy513 changed the title [v8] Add lifecycle flag to buildpacks and create-buildpack [v8] Add lifecycle flag to buildpacks related commands May 1, 2025
@tomkennedy513 tomkennedy513 force-pushed the lifecycle-flag-v8 branch 4 times, most recently from 732f08a to 2c290de Compare May 2, 2025 14:47
Signed-off-by: Tom Kennedy <tom.kennedy@broadcom.com>
Signed-off-by: Tom Kennedy <tom.kennedy@broadcom.com>
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 this pull request may close these issues.

2 participants