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

Support for Maven reproducible builds #104

Merged
merged 1 commit into from
Apr 12, 2024
Merged

Conversation

basil
Copy link
Member

@basil basil commented Apr 12, 2024

Add support for Maven reproducible builds when Maven Release Plugin is not in use, regardless of whether project.build.outputTimestamp is (as would be the case for a plugin that still used MRP for production releases but used Incrementals for PR releases) or is not (as would be the case for a plugin that fully implemented automated release) defined in pom.xml.

Testing done

Verified that when passing -Dset.changelist Maven couldn't verify an incrementals build with mvn clean verify artifact:compare before this PR but could verify it after this PR.

Fixes #103

@@ -100,6 +100,7 @@ public void afterSessionStart(MavenSession session) throws MavenExecutionExcepti
hash = head.abbreviate(ABBREV_LENGTH).name();
try (RevWalk walk = new RevWalk(repo)) {
RevCommit headC = walk.parseCommit(head);
timestamp = DateTimeFormatter.ISO_INSTANT.format(Instant.ofEpochSecond(headC.getCommitTime()));
Copy link
Member

@jglick jglick Apr 12, 2024

Choose a reason for hiding this comment

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

Should produce a string such as 2024-04-12T19:40:42Z which seems to align with https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=74682318#Reproducible/VerifiableBuilds-OutputArchiveEntriesTimestamp though it is vague about allowed precision.

@jglick
Copy link
Member

jglick commented Apr 12, 2024

@basil I am ready to merge this and release 1.8 unless you have any last-minute requests?

@basil
Copy link
Member Author

basil commented Apr 12, 2024

No last-minute requests on my side. Thank you!

@jglick jglick merged commit 941aabd into jenkinsci:master Apr 12, 2024
2 checks passed
@basil basil deleted the reproducible branch April 12, 2024 19:46
MarkEWaite pushed a commit to jenkins-infra/jenkins.io that referenced this pull request Apr 12, 2024
@jglick
Copy link
Member

jglick commented Apr 12, 2024

https://github.com/jenkinsci/incrementals-tools/releases/tag/parent-1.8 ought to be available on Central shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Maven reproducible builds
2 participants