Open Eng-Fouad opened 4 weeks ago
Just a minor observation that storing the build timestamp inside the JAR would impact reproducible builds, but maybe we can make that information optional
Yeah - this seems counter to reproducible builds.
Must it be the actual time or is latest commit time sufficient?
Must it be the actual time or is latest commit time sufficient?
The actual build time.
I don't have a good solution thus very much open for ideas that we need to find a way to at least have a toggle or behavior that avoids this being written as it does make it tricky for reproducible builds.
But instead of having a enabled true/false for every thing that could do this we should consider how this can be handled better/consistenly.
Like, actual build time for me is not something I think make sense to store by default inside the artifact - that fits better some external "build metadata" data. The latest sha/youngest commit timestamp from the build system would be something one could store more consistently and also what reproducible builds normally lean towards.
anyone know of patterns used elsewhere? global "try-make-repeatable-build-artifact" on/off switch that different extensions could honor (as best as they can and if not print warning or possibly fail if they know they can't?)
Just for reference, spring boot supports reproducible builds by defaulting spring-boot-maven-plugin:build-info
's time to project.build.outputTimestamp
.
See: https://github.com/spring-projects/spring-boot/pull/26221
That solves it for that single property but for maven specifically. how about for gradle and how about reaugmentation - there one would expect another build timestamp ?
Description
quarkus.build.timestamp
that is anInstant
of the build timestamp.Implementation ideas
Something similar to [
BuildProperties::getTime
](https://docs.spring.io/spring-boot/api/java/org/springframework/boot/info/BuildProperties.html#getTime()) in spring boot. The build information are stored atMETA-INF/build-info.properties
by maven/gradle then read at runtime and constructed as a bean. The fileMETA-INF/build-info.properties
is registered for inclusion in native image.