.. _koji:
koji - download builds and tags from koji
+++++++++++++++++++++++++++++++++++++++++
Synopsis
--------
.. versionadded:: 0.1
The koji directive interfaces with `Koji `_ to facilitate various Koji actions.
.. note:: This may end up being split into multiple koji download modules, one for builds and another directive for tags
Options
-------
.. raw:: html
    
    
    | parameter | 
    required | 
    default | 
    choices | 
    comments | 
    
            
    | arch | 
    yes | 
     | 
         | 
        buildarch of builds to download from koji | 
    
            
    | command | 
    yes | 
     | 
         | 
        choose whether to download a single build or an entire tag | 
    
            
    | koji_build | 
    yes | 
     | 
         | 
        nevr of koji build to download | 
    
            
    | koji_tag | 
    yes | 
     | 
         | 
        name of tag to download from koji | 
    
            
    | target_dir | 
    yes | 
    ${workdir} | 
         | 
        directory in which to download builds | 
    
        
.. note:: Requires the koji package must be installed as an rpm, it can't be installed via pip
Return Values
-------------
Returns a hashmap of ``{'downloaded_rpms': [file1, file2, ...]}``
Examples
--------
Download the single build ``foo-1.0-2.fc99``::
  - name: download foo
    koji:
      action: download
      envr: foo-1.0-2.fc99
Download the ``f99-updates-testing-tag`` to ``${workdir}/tagdownload/``::
  - name: download f99-updates-testing to tagdownload
    koji:
      action: download_tag
      tag: f99-updates-testing-pending
      target_dir: ${workdir}/tagdownload