refactoring backend build spawning
skvidal at fedoraproject.org
Mon Jun 24 15:43:35 UTC 2013
I've been noodling around with how to allow for arbitrary things to be
run prior to the actual building of the pkgs. This is to allow for a
wide range of 'sources' of pkgs.
I talked with Slavek at summit briefly and we talked about a way to
handle the giturl-of-doom or turning various arbitrary blobs into srpms.
The gist of it is this - we have a place we can do it in the code we
have but we will need to change how builds are being spawned.
Right now we just a direct ansible call to execute mockchain and get
the srpms building. This is simple and immediate but it means we have
to modify code every time we want to add another step.
I'm thinking we use a playbook instead of a direct call. This helps us
b/c it means the playbook is easier to modify and we can get the log
results out of its objects.
for anyone not familiar with ansible playbooks see here:
Here's is the framework I was thinking of:
- setup/create builder
- provision it
- add mock configs, etc
- verify state of the builder
- download srpms/pkgs/giturls/etc
- make into srpms (optionally)
- check integrity of srpms
- check licenses - essentially run the rpmlint license checker
- attempt buildorder sort? (optional but could be handy for a number of
cases - this is using this code:
- mockchain build srpms
- async (perhaps to make it easier to timeout - harder to retrieve
- download results
- destroy builder
This playbook would let us modify the playbook for the type of system
(for example the mechanism to spin up an arm-builder is very very
different from an x86[_64] vm.
The way I figure this would allow us to insert a set of random tasks
into the entire build process w/o having to add more code - just add
more plays into the playbook.
More information about the copr-devel