def search_artifacts(jenkinsurl, jobid, artifact_ids=None ):
    if len(artifact_ids) == 0 or artifact_ids is None:
        return []
    
    jenkinsci = Jenkins( jenkinsurl )
    job = jenkinsci[ jobid ]
    build_ids = job.get_build_ids()
    for build_id in build_ids:
        build = job.get_build( build_id )
        artifacts = build.get_artifact_dict()
        if set( artifact_ids ).issubset( set( artifacts.keys() ) ):
            return dict( ( a,artifacts[a] ) for a in artifact_ids )
        missing_artifacts =  set( artifact_ids ) - set( artifacts.keys() )
        log.debug("Artifacts %s missing from %s #%i" % ( ", ".join( missing_artifacts ), jobid, build_id ))
    #noinspection PyUnboundLocalVariable
    raise ArtifactsMissing( missing_artifacts )
add version to category/package
dataset/ETHPy150Open ramonvanalteren/jenkinsapi/jenkinsapi/api.py/search_artifacts--crossover with--dataset/ETHPy150Open saltstack/salt/salt/modules/portage_config.py/_get_cpv