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

Build plan adapter methods for JibContainerBuilder #2353

Merged
merged 2 commits into from
Mar 27, 2020

Conversation

chanseokoh
Copy link
Member

Adds internal methods for conversion between JibContainerBuilder <--> ContainerBuildPlan. I can't think of other ways to enable this conversion while not adding public methods to JibContainerBuilder.

As we currently build a JibContainerBuilder instance (which is the front-end public API) in our plugins code, the idea for the extension framework is basically like this:

  1. Construct JibContainerBuilder (current behavior).
  2. Convert JibContainerBuilder to ContainerBuildPlan and pass it to extensions.
  3. Extensions modify the ContainerBuildPlan.
  4. Convert ContainerBuildPlan back to JibContainerBuilder.
  5. Plugins code proceeds with JibContainerBuilder to build an image (current behavior)

Another approach would be to revamp everything around BuildContext and ContainerConfiguration in jib-core. However, I think the amount of refactoring work to do so is prohibitively enormous, and this is not practical.

@chanseokoh chanseokoh merged commit b2865c3 into master Mar 27, 2020
@chanseokoh chanseokoh deleted the build-plan-adapters branch March 27, 2020 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants