On 07/03/2013 02:53 PM, Cypher wrote:
If you hook postTag action then you will have 'mytarget' in kws['tag']['name'].
In fact postTag happens after postImport. I am hooking postTag for "on
successful build" becasue otherwise you'll get trouble with some
callback logics being to fast/early and the build isnt processed
entirely in koji yet.

Have a look in my plugins https://github.com/philicious/koji-scripts-and-plugins

For developing plugins I found a good way is to hook various actions
that sound right and just print the kws and see whats in there (refer
https://github.com/auth-scc/koji/blob/master/koji/plugin.py#L35). Also
its good to run koji commands in debug mode to see the actual XMLRPC
calls they are doing.

Enabling the builtin "echo" plugin is a good way to see what data the various callbacks have access to.

On Wed, Jul 3, 2013 at 11:16 PM, Pat Riehecky <[email protected]> wrote:
I'm working on a koji plugin for internal use here and would love a way to
trigger an action off of successful imports of builds against a given tag.

My understanding of the flow goes something like this

$ koji add-target mytag mytarget importhere
$ koji build mytag rpm
### my koji server has 'mytarget' as the target for 'mytag'
### koji builds the rpm from 'mytarget'
### koji imports the successful rpms into 'importhere'

I'd love to be able to get 'mytag' as well as 'importhere'.  But really I
just want 'importhere' for my callback.

It seems that the 'postImport' callback is the right landing spot for me as
it sits where I want it to.  But I don't see a good way of getting the tag
the package is being imported for.  The tag is not provided to the callback
- which strikes me as a bit odd.

Should I just call the XMLRPC 'listPackages' with my pkgID set?  Is there a
suggested way of doing that from a plugin?  Would 'listPackages' even have
the tag data set at this point?

Pat

--
Pat Riehecky

--
buildsys mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/buildsys
--
buildsys mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/buildsys


--
buildsys mailing list
[email protected]
https://admin.fedoraproject.org/mailman/listinfo/buildsys

Reply via email to