extend Package class to store additional metadata.

Authored by knauss on Apr 4 2018, 10:20 AM.

Diff Detail

R857 CI System Tooling
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
knauss requested review of this revision.Apr 4 2018, 10:20 AM
knauss created this revision.
knauss updated this revision to Diff 31280.Apr 4 2018, 10:34 AM

context update.

bcooksley requested changes to this revision.Apr 4 2018, 10:45 AM

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 revision now requires changes to proceed.Apr 4 2018, 10:45 AM
knauss updated this revision to Diff 31283.Apr 4 2018, 11:00 AM

make extraMetadata a Package filed.

bcooksley accepted this revision.Apr 4 2018, 11:10 AM

Thanks, that looks good to go now.

This revision is now accepted and ready to land.Apr 4 2018, 11:10 AM
knauss updated this revision to Diff 31372.Apr 5 2018, 10:49 AM

new context.

bcooksley accepted this revision.Apr 5 2018, 6:22 PM
knauss updated this revision to Diff 43851.Oct 18 2018, 9:44 AM

new context.

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?

knauss updated this revision to Diff 43858.Oct 18 2018, 10:36 AM

use git log to extract current hash.

knauss marked 2 inline comments as done.Oct 18 2018, 10:37 AM

fixed the issues from @bcooksley

knauss added inline comments.Oct 18 2018, 10:39 AM

I just copied that part from capture-workspace.py and capture-install.py, so properly they are needed to be updated too.

bcooksley accepted this revision.Oct 19 2018, 11:16 PM

Thanks for those fixes, i'll get this landed.


Yeah, at the moment our tooling doesn't rely on that metadata, but if we do need to make use of it in the future then we will need to fix that.

This revision was automatically updated to reflect the committed changes.