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

Adds LayerConfiguration. #476

Merged
merged 10 commits into from
Jul 2, 2018
Merged

Adds LayerConfiguration. #476

merged 10 commits into from
Jul 2, 2018

Conversation

coollog
Copy link
Contributor

@coollog coollog commented Jun 29, 2018

Part of #473
This will be fed into BuildConfiguration to configure the extra-files layer.

return this;
}

public LayerConfiguration build() {
Copy link
Member

Choose a reason for hiding this comment

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

required fields are usually passed into the builder directly.

LayerConfiguration.builder(sourceFiles, destinationOnImage).build()

Copy link
Member

Choose a reason for hiding this comment

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

so we don't have to check what are required at what aren't

* @param destinationOnImage Unix-style path to add the source files to in the container image
* filesystem
*/
public LayerConfiguration(List<Path> sourceFiles, String destinationOnImage) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we verify that destinationOnImage is a valid Unix-style path?

Copy link
Contributor Author

@coollog coollog Jul 2, 2018

Choose a reason for hiding this comment

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

That might be more than we want in the constructor. In terms of using this class in a potential future library release, I think having the javadoc state the constraint is good enough rather than adding a hidden check ourselves. An alternative is to just accept a Path and convert it to its Unix string form, but we could think more about that when we do the library.

@coollog coollog merged commit 2c02060 into master Jul 2, 2018
@coollog coollog deleted the add-layerconfiguration branch July 2, 2018 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants