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

Proposal RFC: Jib Core as a library for Java #987

Merged
merged 6 commits into from
Sep 28, 2018
Merged

Conversation

coollog
Copy link
Contributor

@coollog coollog commented Sep 14, 2018

For #337

Preview at: https://github.com/GoogleContainerTools/jib/blob/jib-core-proposal/proposals/jib_core_library.md

Note that the proposed API is currently in implementation.

@coollog coollog requested a review from a team September 14, 2018 19:49
- `JibContainerBuilder setExposedPorts(List<Port>/Port...)`
- `JibContainerBuilder addExposedPort(Port port)`
- `JibContainerBuilder setLabels(Map<String, String> labelMap)`
- `JibContainerBuilder addLabel(String key, String value)`
Copy link
Member

Choose a reason for hiding this comment

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

Weren't we talking about having a more fluent-looking environment(), labels()?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right, that was in #953 - I'll update these to reflect the proposal there.

Copy link
Contributor Author

@coollog coollog Sep 17, 2018

Choose a reason for hiding this comment

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

Actually, after changing this over, I feel like the way we have it now is clearer, since there's a combination of set... and add... methods and removing the prefixes may be confusing since most of the set... methods mean "replace with" rather than "append".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Scratch that - I'll rework this with the setters changed into the ...Only names.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, but for setters like setLayers, layersOnly or the like doesn't sound right.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And just layers is unclear as to whether it appends or replaces.

Copy link
Member

Choose a reason for hiding this comment

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

But I don't think we ever replace layers, do we. At least, not for the API. Right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@coollog coollog requested a review from a team September 17, 2018 20:11
@coollog
Copy link
Contributor Author

coollog commented Sep 17, 2018

Thought about the TargetImage types more and we should probably have SourceImage as well with the initial implementing class be RegistryImage. Jib#from would also need to take a RegistryImage in order to specify credentials for the base image.


`JibContainerBuilder` - configures the container to build
- `JibContainerBuilder layer(List<Path> files, Path pathInContainer)`
- `JibContainerBuilder layer(LayerConfiguration)`
Copy link
Contributor

Choose a reason for hiding this comment

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

These two were changed to addLayer, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, I'll change this over.

@coollog
Copy link
Contributor Author

coollog commented Sep 28, 2018

Merged, but final API may be subject to change.

@coollog coollog merged commit 6793bfb into master Sep 28, 2018
@coollog coollog deleted the jib-core-proposal branch September 28, 2018 15:21
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.

4 participants