-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Conversation
There was a problem hiding this 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; |
There was a problem hiding this comment.
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()); |
There was a problem hiding this comment.
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.
…nfigurationFormatException
Part of #413.
Note that
creationTime
will be fully configurable in the library by this design, but the plugins will only have theuseCurrentTimestamp
option for either using the default time or the time the build is started.