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

Use CNB creator all-in-one lifecycle #21273

Closed
scottfrederick opened this issue Apr 30, 2020 · 2 comments
Closed

Use CNB creator all-in-one lifecycle #21273

scottfrederick opened this issue Apr 30, 2020 · 2 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@scottfrederick
Copy link
Contributor

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.

@scottfrederick scottfrederick added type: enhancement A general enhancement for: team-attention An issue we'd like other members of the team to review labels Apr 30, 2020
@scottfrederick scottfrederick self-assigned this Apr 30, 2020
@wilkinsona
Copy link
Member

We discussed this today and have decided to only support API 0.3 or greater and only run the single creator lifecycle.

@wilkinsona wilkinsona removed the for: team-attention An issue we'd like other members of the team to review label May 1, 2020
@wilkinsona wilkinsona added this to the 2.3.0 milestone May 1, 2020
@philwebb
Copy link
Member

philwebb commented May 1, 2020

This might be a bit late for 2.3.0 and It looks like it's not supported in pack yet (buildpacks/pack#523)

scottfrederick added a commit to scottfrederick/spring-boot that referenced this issue May 8, 2020
Prior to this commit, the build tool plugins set the environment
variable BP_JAVA_VERSION when invoking the CNB builder to set the
version of the JDK/JRE that the builder should use in the created
image.

With CNB API 0.3, the convention changed the name of this environment
variable to BP_JVM_VERSION. This commit updates the build tool
plugins to match the newer convention.

See spring-projectsgh-21273
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

3 participants