appc / goaci

tool to build go projects into ACIs (archived, see https://github.com/rkt/rkt/issues/4024)
Apache License 2.0
103 stars 15 forks source link

add VCS information as a label in the image manifest #6

Open jonboulle opened 9 years ago

jonboulle commented 9 years ago

goaci should record some useful information into the image manifest (as labels and/or annotations).

I'd suggest the first useful bit of information would be a label referencing the git sha (or hg sha, ...) at which the image was built.

krnowak commented 9 years ago

I have implemented getting some information from all VCSes go itself supports, that is - git, hg, svn and bzr. Unfortunately I only tested git only.

My implementation simply creates a label with name like "git", "hg", "svn" or "bzr" and value with whatever "git rev-parse HEAD", "hg id -i", "svnversion" or "bzr revno" returns.