cloudfoundry / cf-for-k8s

The open source deployment manifest for Cloud Foundry on Kubernetes
Apache License 2.0
300 stars 115 forks source link

cf push with buildpack tag (buildpack pinning) #372

Open hsiliev opened 4 years ago

hsiliev commented 4 years ago

Is your feature request related to a problem? Please describe. App developers need to "pin" to a specific version of a buildpack to be able to select a time-window in which to perform an update to a newer buildpack version.

For example in VM/BOSH world app developers can use the -b option specifying URL with tag/SHA:

   --buildpack, -b              Custom buildpack by name (e.g. my-buildpack) or Git URL (e.g. 'https://github.com/cloudfoundry/java-buildpack.git') or Git URL with a branch or tag (e.g. 'https://github.com/cloudfoundry/java-buildpack.git#v3.3.0' for 'v3.3.0' tag). To use built-in buildpacks only, specify 'default' or 'null'

Describe the solution you'd like To be 100% backward compatible and have feature parity with VM/BOSH world the following should be possible:

cf push myapp -b 'https://github.com/cloudfoundry/java-buildpack.git#v3.3.0'

This might result the folowing on-the-fly flow:

  1. download of the buildpack
  2. build of custom paketo stack
  3. upload the paketo stack in cache (blobstore/regirstry)
  4. use the newly build stack for producing OCI image for the app

Describe alternatives you've considered One might be able to:

  1. build a custom buildpack stack using kpack/paketo CLI
  2. upload the buildpack using cf create-buildpack
  3. use the custom buildpack with -b <buildpack name>

This however requires

Additional context Connected to issue #340. This feature request is around the Git URL format supported by -b and the flow that allows app developers to use specific SHA of a buildpack, effectively delegating them the operational aspects around the buildpacks (security patching, deprecated use of languages and libraries, etc.)

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/174363388

The labels on this github issue will be updated when the story is started.