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

Add creationTime parameter to BuildConfiguration #628

Merged
merged 5 commits into from
Jul 17, 2018
Merged

Conversation

TadCordle
Copy link
Contributor

@TadCordle TadCordle commented Jul 16, 2018

Part of #413.

Note that creationTime will be fully configurable in the library by this design, but the plugins will only have the useCurrentTimestamp option for either using the default time or the time the build is started.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Copy link
Contributor

@coollog coollog left a comment

Choose a reason for hiding this comment

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

Just small comments 👍

@@ -30,10 +31,22 @@
private final ImageLayers.Builder<T> imageLayersBuilder = ImageLayers.builder();
private final ImmutableList.Builder<String> environmentBuilder = ImmutableList.builder();

private Instant created = Instant.EPOCH;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably note why this is epoch by default or have this be @Nullable, preferring the latter since by spec, this is an optional field and the setting to 0 should be a default passed in from BuildConfiguration

imageBuilder.setCreated(Instant.parse(containerConfigurationTemplate.getCreated()));
} catch (DateTimeParseException ex) {
throw new BadContainerConfigurationFormatException(
"Invalid image creation time: " + containerConfigurationTemplate.getCreated());
Copy link
Contributor

Choose a reason for hiding this comment

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

We should change BadContainerConfigurationFormatException to take the cause too.

@TadCordle TadCordle merged commit 034db7e into master Jul 17, 2018
@TadCordle TadCordle deleted the timestamp-config branch July 17, 2018 14:41
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

2 participants