The Archive class in this case represents the whole repository, so having the extraMetadata stored at the instance level is probably incorrect here (as it belongs to the actual package itself)
Could we pass this as an argument to generateMetadataForFile / storePackage instead to keep it attached to just the package it belongs to?
This looks fine to me - not 100% sure about the GIT_COMMIT variable though.
In a Jenkins Pipeline environment I believe this environment variable is never set, so to get the hash you'll need to shell out to Git unfortunately (git describe HEAD or git log --format=%H -n 1 HEAD are your friends here)
pressed -> pre-seed?