kas icon indicating copy to clipboard operation
kas copied to clipboard

export the 'manifest'

Open vermaete opened this issue 3 years ago • 4 comments

I'm looking for the same functionality of 'repo manifest -r -o my-manifest.xml' of google repo in Kas. Is there something to export all git hash stuff from the meta layers into a new exported YML file?

vermaete avatar May 26 '21 20:05 vermaete

I suppose the scenario is having either an include combination on the command line (kas.yml:opt.yml...) or an include hierarchy inside the yaml files, right? What would be the use case in the end?

In any case, we do not yet have a re-export of a flattened yaml file yet. Relates a bit to what we are discussing on the mailing list: https://groups.google.com/d/msgid/kas-devel/76b80bb2-3792-528d-5ed9-6c15b969a194%40siemens.com.

jan-kiszka avatar May 27 '21 05:05 jan-kiszka

Hi Jan,

I thing that a flattened yml file is what I'm looking for.

Use case: 1 ) CI starts with the normal yml file that in in SCM. 2) Once it's done, it will export a new yml file with the hashes of all git repo's hard coded. E.g. 'release.yml'. 3) And CI put's a git tag on that file. 4) ISO auditor comes and believes everything is under control to rebuild this exact image in a galaxy far far away.

This is now working for use with google repo with 'repo manifest -r -o release.xml'. But nobody would be missing repo if this use case would work with KAS.

br

vermaete avatar May 27 '21 18:05 vermaete

OK, so you have another requirement on top: not only unflatten the yaml files, but also translating floating branch refs into SHAs, right? Technically surely feasible. Would likely be best modeled as additional parameter to kas build. Now it just takes someone to sit down and code this...

jan-kiszka avatar May 27 '21 18:05 jan-kiszka

Still relevant? Anyone interested in working on this?

jan-kiszka avatar Aug 26 '22 14:08 jan-kiszka

I wrote a python script for our use case, maybe it's relevant to somebody: https://github.com/chrysh/kas-scripts

chrysh avatar Oct 28 '22 13:10 chrysh

@vermaete, @chrysh : Please have a look at this patch series [1]. I guess it handles all your requirements:

  • flatten all includes into one file (json or yaml), no matter how they are specified (include, vs. cmdline)
  • relative refspecs can be resolved (e.g. branch name -> SHA)
  • output itself is kas compatible (only yaml version) and without any loss of semantic information

[1] https://groups.google.com/g/kas-devel/c/_SRmcWulI6I

fmoessbauer avatar Nov 06 '22 09:11 fmoessbauer

IMHO, we have this feature now in latest kas. If something is missing, reopen or create a new issue.

jan-kiszka avatar Jan 12 '23 16:01 jan-kiszka

Please also note that Felix suggest a lock extension now, see https://groups.google.com/g/kas-devel/c/pY8G4JuaQS8. Any feedback on that should go to that posting, please.

jan-kiszka avatar Jan 13 '23 07:01 jan-kiszka