Skip to content

Use CNB creator all-in-one lifecycle #21273

Closed
@scottfrederick

Description

@scottfrederick

Since Platform API 0.3, CNB builders support a creator lifecycle. This lifecycle executes all other lifecycle phases (detector, analyzer, restorer, builder, exporter) in the proper order.

Using the creator has a few benefits for Spring Boot:

  1. All lifecycle phases are run in the same container instead of each phase being run in its own container. This has shown to reduce image build time by ~6 seconds.
  2. Phase orchestration is delegated to the creator, insulating Boot from future orchestration changes like phase ordering which has happened between lifecycle versions.
  3. Builder invocation code can be simplified considerably.

Boot could continue to support conditionally running discrete phases to retain compatibility with Platform API 0.2 builders, or only support API 0.3 or greater and only run the single creator lifecycle. Dropping support for API 0.2 would give the greatest benefit in code simplification.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions